Forum Moderators: coopster
Please can anyone tell me how can I display the number of items (or subcategories) found in a category? This is a common feature used often in sites (mostly e-commerce or forums).
Example: You have a database table say for 'famous_quotes'. Each row contains the fields 'quote', 'author' and 'category'. There are many different quotes in the table, but some of them share the same value for 'category'.
I can display all rows. I can also display DISTINCT 'category names' but I 'm having trouble displaying how many different rows fall under thesame category. something like:
funny (3) religious(38)
Wisdom (14) science(19)
business (6)
how do i get the numbers in brackets is what i'm asking?
Thanks guys!