My SQL syntax
-
Hi,
Can you help me what this error means and how to fix this? I just uploaded this plugin but not sure if this is why I’m getting an error now and not before.[You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘GROUP BY YEAR(post_date_gmt),MONTH(post_date_gmt)’ at line 1]
SELECT DISTINCT YEAR(post_date_gmt) ASyear, MONTH(post_date_gmt) ASmonth, MAX(post_date_gmt) as last_mod, count(ID) as posts FROMwp_postsWHERE post_date < ‘2013-04-11 17:15:45’ AND post_status = ‘publish’ AND post_type = ‘post’ ORDER BY post_date_gmt DESC GROUP BY YEAR(post_date_gmt),MONTH(post_date_gmt)Thanks,
Mia1031
The topic ‘My SQL syntax’ is closed to new replies.