| Martin Norland 2004-11-24, 3:56 pm |
| -----Original Message-----
From: Mark Benson [mailto:markbenson@mac.com]=20
>The real problem you're having is the statement says "while there are=20
>results in this query, grab them" - once you reach the end of the first
>while loop, there are no more results, so the second one is skipped=20
>right over - it's condition *never* evaluates true.
So by running a "while (mysql_fetch_array($result)" loop over a fetch
array you effectively empty it?
<snip>
Well, not really - although in the end, yes, it will be 'empty' -
mysql_fetch_array actually fetches a single row (the next one, if
available) returned from the mysql query into an associative array.
You're being handed the data from mysql, one row at a time as requested,
and sticking it into an array. $result is actually the resource id that
you give mysql so it knows what query to give you the information back
from.
- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.
|