Because you do mysql_fetch_assoc() once before going into your while loop.
Get rid of that first $row_prefs = mysql_fetch_assoc(...) line there and
it will work.
-Rasmus
On Fri, 12 Mar 2004, Elliot J. Balanza wrote:
> Ok thanks to Michael Nolan I was able to do what I needed. The final code is
> this:
>
> <snip-snip>
> mysql_select_db($database_MBTTIENDA, $MBTTIENDA);
> $query_prefs = "SELECT * FROM mtmbt_prefs ORDER BY Pref_name ASC";
> $prefs = mysql_query($query_prefs, $MBTTIENDA) or die(mysql_error());
> $row_prefs = mysql_fetch_assoc($prefs);
> $totalRows_prefs = mysql_num_rows($prefs);
>
> while ($row_prefs = mysql_fetch_assoc($prefs)) {
> $MTMBT[$row_prefs['Pref_name']] = $row_prefs['Pref_value'];
> }
>
> mysql_free_result($prefs);
> <snip-snip>
>
> and it works fine EXCEPT it wont show the first record of the query... any
> ideas why?
>
> Vamp
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php