note 27475 added to function.mysql-num-rows

From: Date: Sat, 07 Dec 2002 03:02:36 +0000
Subject: note 27475 added to function.mysql-num-rows
Groups: php.notes 
Request: Send a blank email to php-notes+get-40448@lists.php.net to get a copy of this message
$result = mysql_query("SELECT viewed FROM $SQL_TBL_MESSAGES WHERE to = $l_user AND viewed = '' "); $anymsg = mysql_num_rows ($result); That us my select statement but when I go to get the number of rows i recieve the following error Warning: Supplied argument is not a valid MySQL result resource. Can I not use Where with num rows as I need to only see how many rows there are with that criteria help please. -- http://www.php.net/manual/en/function.mysql-num-rows.php http://master.php.net/manage/user-notes.php?action=edit+27475 http://master.php.net/manage/user-notes.php?action=delete+27475 http://master.php.net/manage/user-notes.php?action=reject+27475

« previous php.notes (#40448) next »