Hey John, Yep, this is just for one row as I need to know which file before I force a download. This is for people selling ebooks, MP3s etc
I usually use a while loop if I need multiple rows returned. Cheers, -Ryan On 3/23/2004 3:07:14 AM, [EMAIL PROTECTED] wrote: > Ryan A wrote: > > > if(($r = mysql_fetch_row($res)) >=1) > > if($r = mysql_fetch_row($res)) > > will work fine if you only have one row being returned. If you have more > than one that you need to loop through, then: > > if($r = mysql_fetch_row($res)) > { > do > { > > }while($r = mysql_fetch_row($res)); > } > > Now you have the added efficiency of not having to call mysql_num_rows() > (if you don't need that value). > > -- > ---John Holmes... > > Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ > > php|architect: The Magazine for PHP Professionals - www.phparch.com > > -- > 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