Hi!
I'm using Joomla and I need to create a query that counts all rows (articles) in my table that have the same "parent_id" (category). I can do it like this:
SELECT COUNT(*) FROM table WHERE parent_id = $my_id
and then loop that for every parent_id. There might be many parent_ids so I wonder if I somehow can count everything in one query and then get the data from an array with a loop.
Like use the GROUP by parent_id COUNT(*) as c ....
I hope someone understands what I mean. If not, scream and I will try to explain better

Mysql version: 5.0.67
Best regards
Linus