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



Reply via email to