|
I'm not sure it's possible to do that in MySQL. It sounds like you need some sub-selects, which if memory serves me don't exist in MySQL. Maybe in the beta versions it does. I know PostgreSQL supports them.
Basically, you'd need to query using the count function inside a query that returns all the categories.
|