Re: How can I get the number of entries retrieved by a "SELECT - FROM"
| From: | Ronan Chilvers | Date: | Fri, 13 Jun 2003 08:18:09 +0000 |
| Subject: | Re: How can I get the number of entries retrieved by a "SELECT - FROM" | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-28592@lists.php.net to get a copy of this message | ||
On 12 Jun,2003 at 18:21 Becoming Digital wrote:
<snip>
> > The PHP "SELECT FROM" below (before snip) listed the expected data.
> > Is there a way to get the digit "3" into a PHP variable
>
> $data = mysql_result($result,1,"name"));
>
>
> > How do I trap or collect or save the digit "3" generated the
> > mysql "SELECT COUNT(*)" statement below?
>
</snip>
Or do
SELECT COUNT(*) AS mycount ...
which will give you a result set with, eg: an array key called 'mycount' that you can
grab.
Ronan