This is how you can do it (just tried it on my news with my news categoryID's)
i'll modify slightly for your purpose with psuedo code ...
SELECT carType,count(carType) FROM cars GROUP BY carType;
--Joe
On Fri, Apr 06, 2001 at 11:28:00AM +1200, YoBro wrote:
> Hello,
>
> I have a site that lists cars in a MySql database.
> I want to display on a page how many makes of each are in the database
> (Under the feild make)
> Like:
> Honda (30) //Then links to the honda page etc
> Toyota (25)
> Ford (7)
>
> Do you know what I mean. I know how to produce results from MySql, but I
> don't know how to get it to count how many hondas, toyotas etc on the same
> page from within the database.
>
>
> help!
>
> --
> Regards,
>
>
> YoBro
> -------------------------------------------------------------
> DO NOT REPLY TO THIS VIA EMAIL
> PLEASE USE THE NEWSGROUP
> All emails sent to this address are automatically deleted.
> This is to avoid SPAM!
> -------------------------------------------------------------
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
/******************************************************************************\
* Joe Stump - PHP/SQL/HTML Developer *
* http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net *
* "Better to double your money on mediocrity than lose it all on a dream." *
\******************************************************************************/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]