note 80137 added to function.mysql-num-rows
| From: | gyuri79 at yahoo dot com | Date: | Mon, 31 Dec 2007 07:49:33 +0000 |
| Subject: | note 80137 added to function.mysql-num-rows | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-134597@lists.php.net to get a copy of this message | ||
I think I found a bug
If you put "or die(mysql_error());" after the mysql_num_rows function, and the the
returned rows are null or empty, your script will 'die' since mysql_num_rows is 0 :DD OMG
Don't use it like this :D
$num_rows = mysql_num_rows($result) or die(mysql_error());
----
Server IP: 195.56.193.13
Probable Submitter: 91.120.110.3
----
Manual Page -- http://www.php.net/manual/en/function.mysql-num-rows.php
Edit -- https://master.php.net/note/edit/80137
Del: integrated -- https://master.php.net/note/delete/80137/integrated
Del: useless -- https://master.php.net/note/delete/80137/useless
Del: bad code -- https://master.php.net/note/delete/80137/bad+code
Del: spam -- https://master.php.net/note/delete/80137/spam
Del: non-english -- https://master.php.net/note/delete/80137/non-english
Del: in docs -- https://master.php.net/note/delete/80137/in+docs
Del: other reasons-- https://master.php.net/note/delete/80137
Reject -- https://master.php.net/note/reject/80137
Search -- https://master.php.net/manage/user-notes.php