Re: mysql_fetch_array
| From: | J.Veenhuijsen | Date: | Tue, 25 Feb 2003 14:32:39 +0000 |
| Subject: | Re: mysql_fetch_array | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-25908@lists.php.net to get a copy of this message | ||
Maybe on the 14th record the while statement is false.
Try do...while ???
Jochem
F.Collineau wrote:
Hi, Here is my code: <? require("util.php"); $sql= new MySQL_class; $sql->Setup("user","user","localhost"); $sql->connexion("materiel"); $sql->Query("select nom from personne"); $cpt=0; while($row=mysql_fetch_array($sql->result)) { print($cpt); print("<br>"); print($row["nom"]); print("<br>"); $cpt++; } $sql->close; ?> The personne table has 14 articles. but with this code i can see only 13 articles here is the output on a browser: 0BRUYÈRE 1COLLINEAU 2ELIAS 3GLOANEC 4HUGOT 5LE BRIS 6LE FLOCH 7LEMAUVIEL 8LOUVEL 9MARTINIERE 10OGUET 11THOMAS 12VASSELET What is the problem ? Thanks Franck ------------------------------------------ Faites un voeu et puis Voila ! www.voila.fr