building on the only reply that I saw try this also.
Say you had 12 different TYPE's that are in your table, and you only wanted
5 of them.
Then you will want something like what follows.
SELECT type, count(*) FROM table WHERE type='$1' OR type='$2' OR \
type='$3' OR type='$4' OR type='$5' GROUP BY type;
another way you can write this is like the following,
but it won't take advantage of indices
SELECT type, count(*) FROM table WHERE type IN ('$1', '$2', '$3', '$4',
'$5') GROUP BY type;
Jim Lucas
----- Original Message -----
From: "Ryan A" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 07, 2003 8:53 AM
Subject: Re: [PHP] selecting count and then dumping to an array
> Thanks guys,
> will give it a shot and write back if i have any problems.
> Cheers,
> -Ryan
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php