Re: looping through database results

From: Date: Sun, 30 Sep 2001 22:32:48 +0000
Subject: Re: looping through database results
Groups: php.general 
Request: Send a blank email to php-general+get-69392@lists.php.net to get a copy of this message
Thanks for your help, Andrew, but it didn't seem to work. As I read the manual (http://www.php.net/manual/en/function.mysql-fetch-array.php), mysql_fetch_array is much like mysql_fetch_row, except that it uses the field names instead of numbers as the array key. Somebody correct me if I'm wrong... Karl Andrew Elliston wrote: > Try using: > > while ($event_row = mysql_fetch_row($events)) > > instead. mysql_fetch_row will grab one row of the result array at a > time, until there are no more rows. This sounds like what you want. What > you were doing was grabbing the entire result array and storing them in > one variable.

« previous php.general (#69392) next »