note 6858 deleted from mysql_num_rows by ronabop
| From: | ronabop@php.net | Date: | Sat, 19 Aug 2000 04:18:06 +0000 |
| Subject: | note 6858 deleted from mysql_num_rows by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-2630@lists.php.net to get a copy of this message | ||
Sorry, there was something wrong when posting the previous note, here is it again:
In reply to jschoolc@utopiad.com and adimco@gmx.net: I also have to same problem. I found out that
this warning-message only occurs when there are no rows matching a query (or when an insert or
update query is used). With php3 the value result-identifier in such case would be <= 2, but with
php4 it's now called Resource id #2. So, with an ereg() or split() it should be possible to get
the number. Then you can make something like:
<pre>
$arr = split('#', $qID);
if ($arr[1] > 2) return mysql_num_rows($qID);
else return 0;
</pre>
-- But i don't know if it works