Not really sure on how to do this as i'm not too great with mysql.
I have 2 tables categories and news.
news has a unique id and a category id
categories has the catagory id and the name to be used on it.
Im trying to make some stats that lists all the category names and the number of times it has been used in the news table
This is my latest attempt at it.
SELECT COUNT( * ) AS rows, news.category, categories.catname FROM news, categories GROUP BY category ORDER BY category WHERE catid=category