first record not displayed

From: Date: Mon, 23 Jan 2006 20:31:06 +0000
Subject: first record not displayed
Groups: php.db 
Request: Send a blank email to php-db+get-41127@lists.php.net to get a copy of this message
Hi, I have the feeling I'm missing something very obvious here, but it's driving me nuts! Using this select statement: $result = mysql_query("SELECT * FROM latlong ",$link); $nrows = mysql_num_rows($result); and either of these to display the results: for ($j=0; $rec=mysql_fetch_array($result); $j++){ print "j=$j id={$rec["id"]} seq={$rec["seq"]}\n"; } while($row = mysql_fetch_array($result)){ echo "id={$row["id"]} seq={$row["seq"]} \n"; } The very first record gets dropped/not displayed. The number of records returned ($nrows) matches what I get from MySQL and the first record gets displayed (using PHPMyAdmin). Even if I change the select to pull only certain records, the very first one does not get displayed. Can anyone shed any light on this for me? Thanks! Paul ******************************************************************************************************** Paul H. Bern, Ph.D. Numeric Data Services Librarian The only thing worse than not 352 Bird Library getting what you wanted 222 Waverly Ave. is getting what you asked for. Syracuse, NY 13244 315-443-1352 http://library.syr.edu/information/mgi/nds

« previous php.db (#41127) next »