mysql - first element missing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I try to display the result of a mysql request but first element misses !
here is my code:

$sql->Query("select marque, reference from base );
$sql->afficheResultatRequete($sql->result,$sql->nbreChamps);

 function Query ($query) {
        $this->result = @mysql_query($query, $this->id) or MySQL_ErrorMsg ("Impossible
de lancer la requete: $query");
        $this->rows = @mysql_num_rows($this->result);
	$this->nbreChamps = @mysql_num_fields($this->result);
	$this->ligne = @mysql_fetch_row($this->result);
}


function afficheResultatRequete($result,$nbChamps)
{
	for($i=0 ; $row=mysql_fetch_row($result);++$i)
	{
		print("<tr>");
$this->color_tab($i);
		for($j=0;$j<$nbChamps;$j++)
		{
			print "<td>"; print((string)$row[$j]); "</td>\n";
		}
		print "</tr>";
	}

}

Whet is the problem ?

Thanks

Franck
------------------------------------------

Faites un voeu et puis Voila ! www.voila.fr 



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux