note 6857 deleted from mysql_num_rows by ronabop
| From: | ronabop@php.net | Date: | Sat, 19 Aug 2000 04:14:46 +0000 |
| Subject: | note 6857 deleted from mysql_num_rows by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-2628@lists.php.net to get a copy of this message | ||
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: "if (number
> 2) return mysql_num_rows(...); else return 0;" -- I think...