note 28989 added to function.mysql-num-rows

From: Date: Wed, 29 Jan 2003 22:02:11 +0000
Subject: note 28989 added to function.mysql-num-rows
Groups: php.notes 
Request: Send a blank email to php-notes+get-43091@lists.php.net to get a copy of this message
another mysql_num_rows error $getlin = @mysql_query("SELECT * FROM Network WHERE Admin='1' LIMIT 0,8") || die(mysql_error()); if(mysql_num_rows($getlin) == false)die('no results'); you look at this and say "hey all the syntax is right here what are you talking about error?" well after 3 days i still hadn't figured it out, not even in Y! web design chat or from people i know who know mysql... anyways i finaly figured out you can't use the @ to suppress errors when you would like to use mysql_num_rows on the variable or it will return the fallowing error Warning: Supplied argument is not a valid MySQL result resource after i got rid of the '@' and '|| die' the problem cleared up good luck with all your mysql adventures ;) -- http://www.php.net/manual/en/function.mysql-num-rows.php http://master.php.net/manage/user-notes.php?action=edit+28989 http://master.php.net/manage/user-notes.php?action=delete+28989 http://master.php.net/manage/user-notes.php?action=reject+28989

« previous php.notes (#43091) next »