|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-11-13 00:37 UTC] gschlossnagle@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 10:00:02 2025 UTC |
Description: ------------ When using a while loop such as in the example below: It skips over the very first entry within the table. Say I have 5 rows which have a lvl of 3, when printing out the name of said row, only the last 4 will print out. Reproduce code: --------------- mysql_connect (localhost, root, ''); mysql_select_db (Arakaron); $result=mysql_query ("SELECT * FROM magic WHERE lvl='3'"); $row = mysql_fetch_array($result); while ($row = mysql_fetch_array($result)) { print $row['name']; } Expected result: ---------------- I expect to see all 5 names of the rows instead of the last 4. Actual result: -------------- Only shows the very last 4 rows which have a level of 3.