RE: [PHP] looping through database results

2001-09-30 Thread Jack Dempsey
] Subject: Re: [PHP] looping through database results 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 inste

Re: [PHP] looping through database results

2001-09-30 Thread Karl Nelson
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

Re: [PHP] looping through database results

2001-09-30 Thread elists
On Sunday, September 30, 2001, at 02:45 PM, Karl Nelson wrote: > while ($event_row = mysql_fetch_array($events)) >{ >$event_day = $event_row["event_day"]; >if ($event_day == $day) > { > $event_name = $event_row["event_name"]; > print "$event_name\n"; > } >} > S

RE: [PHP] looping through database results

2001-09-30 Thread Jack Dempsey
hi karl just to let you know, i believe there's a good calendar app on php.net before i knew about this though, i wrote my own. some general advice: i often take results from mysql calls and build data structures with the data. then, you always have that data available, and you can loop as many t