On Saturday 22 January 2005 08:02, Phillip S. Baker wrote:
> I am pulling records from a MySQL DB.
> I am walking through the array using the whole.
You do realise that doing this ...
> if ( $row = mysql_fetch_assoc($result)) {
> do {
> // Some stuff
> } while ( $row = mysql_fetch_assoc($result));
> }
... effectively discards the first result of any resultset that you get?
Unless that really is your intention then simply use a while-loop. If there
aren't any results nothing in the while-loop will be executed (which means
there is no need for the IF).
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
New Year Resolution: Ignore top posted posts
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php