Fatal error: Uncaught Exception: Error: 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 MONTH(p.date_published) = 11' at line 1<br />Error No: 1064<br />SELECT COUNT(DISTINCT p.post_id) AS total FROM oc_bm_post p LEFT JOIN oc_bm_post_description pd ON (p.post_id = pd.post_id) LEFT JOIN oc_d_meta_data md ON (md.route = CONCAT('bm_post_id=', p.post_id) AND md.store_id = '0' AND md.language_id = '1') LEFT JOIN oc_bm_post_to_store p2s ON (p.post_id = p2s.post_id) Left JOIN oc_bm_review r ON (p.post_id = r.post_id) WHERE pd.language_id = '1' AND p2s.store_id = '0' AND p.status = '1' AND YEAR(p.date_published) = AND MONTH(p.date_published) = 11 in /var/www/vhosts/80/786884/webspace/httpdocs/houseoftea.ie/system/storage/modification/system/library/db/mysqli.php:40 Stack trace: #0 /var/www/vhosts/80/786884/webspace/httpdocs/houseoftea.ie/system/library/db.php(16): DB\MySQLi->query('SELECT COUNT(DI...', Array) #1 /var/www/vhosts/80/786884 in /var/www/vhosts/80/786884/webspace/httpdocs/houseoftea.ie/system/storage/modification/system/library/db/mysqli.php on line 40