note 49396 added to function.mysql-num-rows

From: Date: Wed, 26 Jan 2005 17:04:23 +0000
Subject: note 49396 added to function.mysql-num-rows
Groups: php.notes 
Request: Send a blank email to php-notes+get-84031@lists.php.net to get a copy of this message
Ok I've followed pretty well your arguments but why? do I get this : Warning : mysql_num_rows(): supplied argument is not a valid MySQL result resource by running this $link = mysql_connect($Server, $User, $Pass); mysql_select_db($DB, $link); $result = mysql_query("SELECT * FROM comments", $link); $num_rows = mysql_num_rows($result); echo "$num_rows Rows\n"; I've obviously tried other options but I'm not getting the proper result. It should return '0' ---- Manual Page -- http://www.php.net/manual/en/function.mysql-num-rows.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49396 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49396&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49396&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49396&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49396&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49396&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49396&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#84031) next »