Vigane päing:
SELECT *, SUM(Counter) AS Total FROM www_ee_fotod_stat.PicStats WHERE PicStats.Date BETWEEN DATE_ADD(CURDATE(), INTERVAL - DAY) AND CURDATE() AND Account != 'linn@email.ee' GROUP BY ImageID ORDER BY Total DESC, ImageID ASC LIMIT 300
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 ') AND CURDATE() AND Account != 'linn@email.ee' GROUP BY ImageID ' at line 3