I'm having a conflict in the following query:
SELECT COUNT(*) AS poststotal FROM posts GROUP BY category
The following query returns the poststotal containing the number of categories instead of the total posts count groupped by categories.
So:
TABLE: posts(title,category)
----------------------------
foo1 | art
foo2 | politic
foo2 | politic
foo3 | fun
Will return:
4
Instead of:
3 posts
How to deal with that?