Re: mysql_numrows
| From: | Daniel Rezny | Date: | Mon, 06 Aug 2001 13:44:56 +0000 |
| Subject: | Re: mysql_numrows | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-61414@lists.php.net to get a copy of this message | ||
Hello AJDIN,
Monday, August 06, 2001, 3:34:49 PM, you wrote:
AB> Hi
AB> I'm trying to get number of rows from a query. All works fine until
AB> the result is 0. Then query executes fine, returns 0 rows but mysql_numrows
AB> failes.
AB> $query="select * from mytable";
AB> $result=mysql_query($query) or die("select failed");
AB> $num_rows=mysql_numrows($result) or die("select count failed");
do it like this:
$num_rows=@mysql_numrows($result) or die("select count failed");
^
if you give there this character it don't give you a error.
I hope it helps
--
Best regards,
Daniel mailto:daniel@rezny.sk