I have a set of posts on monthly basis. Now i need an array which contains total records of posts posted in each month. I tried below MySql query, Its working fine, but I wa
If the result set had no posts during that time period, you won't get any results to count, hence why it doesn't show.
You would need to either join to another table that has all of the year months or fill in the data programmatically when the results are returned. I can't think of another way to do this, but perhaps it's possible.
Also, as others have said, separate the group by a comma.