Re: sort in while(list($vars) = mysql_fetch_row($result))

From: Date: Wed, 27 Feb 2008 15:53:32 +0000
Subject: Re: sort in while(list($vars) = mysql_fetch_row($result))
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-270315@lists.php.net to get a copy of this message
On Wed, Feb 27, 2008 at 10:27 AM, Verdon Vaillancourt <verdonv@verdon.ca> wrote: > Hi Dan, > > Thanks for the input. The only reason is that I'm inheriting this > from someone else and am asked to do a 'quick' fix to get it working > again. The whole script is a little kludgy and it may be better to > redo it. Is there anything fundamentally wrong with the while(list()) > approach, or is it just messy? As a "quick fix" I'd definitely recommend using the while($row = mysql_fetch_array($result)) approach. There's not really anything seriously or fundamentally wrong with the while(list()) option, but it's unnecessary extra work when all you're doing is grabbing two variables (as illustrated in your example). -- </Dan> Daniel P. Brown Senior Unix Geek <? while(1) { $me = $mind--; sleep(86400); } ?>

« previous php.general (#270315) next »