Re: counting records in db
| From: | afan at afan dot net | Date: | Thu, 26 Oct 2006 17:49:39 +0000 |
| Subject: | Re: counting records in db | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-243690@lists.php.net to get a copy of this message | ||
Hm. There is a little problem - this doesn't work.
Warning: mysql_result(): supplied argument is not a valid MySQL result
resource in /var/www/html/xxx/tests/count.php on line 28
?
> $query = mysql_query("
> SELECT COUNT(*) as NoOfRecords
> FROM customers
> WHERE last_name = 'Smith'");
> $result = mysql_result($query, 0);
>