Re: Select Count(*) into variable
| From: | Donald Undeen | Date: | Mon, 21 Aug 2000 14:43:58 +0000 |
| Subject: | Re: Select Count(*) into variable | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-2221@lists.php.net to get a copy of this message | ||
Nick Boyle wrote:
> select count(*), name, town, county from tablename group by telephone, town
>
> If I wish to do a select (like above), and then process depending on number
> of results, how can I put the count(*) into a variable??
$query = "select count(*) AS foo, name, town, county from tablename group by
telephone, town";
(assuming MySQL, though it may be true for others as well...)
>
>
> Many thanks in advance
>
> Nick
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net