note 106714 added to function.mysql-num-rows

From: Date: Wed, 30 Nov 2011 13:06:16 +0000
Subject: note 106714 added to function.mysql-num-rows
Groups: php.notes 
Request: Send a blank email to php-notes+get-184819@lists.php.net to get a copy of this message
If the result of a mysql_query() returns an empty recordset, then it needs to be checked with: $sql="SELECT * FROM mytable"; $result=mysql_query($sql); if (mysql_num_rows($result) == -) { // Empty record set code } else { // Valid recordsets code } ---- Server IP: 69.147.83.197 Probable Submitter: 117.211.88.180 ---- Manual Page -- http://www.php.net/manual/en/function.mysql-num-rows.php Edit -- https://master.php.net/note/edit/106714 Del: integrated -- https://master.php.net/note/delete/106714/integrated Del: useless -- https://master.php.net/note/delete/106714/useless Del: bad code -- https://master.php.net/note/delete/106714/bad+code Del: spam -- https://master.php.net/note/delete/106714/spam Del: non-english -- https://master.php.net/note/delete/106714/non-english Del: in docs -- https://master.php.net/note/delete/106714/in+docs Del: other reasons-- https://master.php.net/note/delete/106714 Reject -- https://master.php.net/note/reject/106714 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#184819) next »