Re: [PHP] New Problem with Arrays won't show the first record of a query.

2004-03-12 Thread Elliot J. Balanza
Thanks guys... it works dandy now. Vamp <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > On 12 Mar 2004 Elliot J. Balanza wrote: > > > . > > $row_prefs = mysql_fetch_assoc($prefs); > > . > > while ($row_prefs = mysql_fetch_assoc($prefs)) { > > . > > > and it works fi

Re: [PHP] New Problem with Arrays won't show the first record of a query.

2004-03-12 Thread trlists
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 tim

Re: [PHP] New Problem with Arrays won't show the first record of a query.

2004-03-12 Thread Rasmus Lerdorf
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 i

[PHP] New Problem with Arrays won't show the first record of a query.

2004-03-12 Thread Elliot J. Balanza
Ok thanks to Michael Nolan I was able to do what I needed. The final code is this: 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_as