note 43489 deleted from function.mysql-fetch-assoc by tomsommer

From: Date: Mon, 05 Jul 2004 19:14:47 +0000
Subject: note 43489 deleted from function.mysql-fetch-assoc by tomsommer
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-72625@lists.php.net to get a copy of this message
Note Submitter: matt@teddybearmafia.com ---- Whenver you use the mysql_fetch_assoc(), it removes the current entry. This makes it work with the while statement, but causes problems if you try to use a check before the while statement. if (mysql_fetch_assoc($request)) { //The first row was removed in the check, you're one short! while ($row = mysql_fetch_assoc($request)) { echo 'In WHILE loop'; } }

« previous php.notes (#72625) next »