Re: New Problem with Arrays won't show the first record of a query.
| From: | trlists at clayst dot com | Date: | Sat, 13 Mar 2004 02:36:44 +0000 |
| Subject: | Re: New Problem with Arrays won't show the first record of a query. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-180309@lists.php.net to get a copy of this message | ||
On 12 Mar 2004 Elliot J. Balanza wrote:
> .....
> $row_prefs = mysql_fetch_assoc($prefs);
> .....
> while ($row_prefs = mysql_fetch_assoc($prefs)) {
> .....
> and it works fine EXCEPT it wont show the first record of the query... any
> ideas why?
Yes ... see the two lines quoted above. Each time you call
mysql_fetch_assoc you get another record. The first one loads the
first record, the second loads all the others. Delete the first call
and it should do what you want.
--
Tom