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 published > '2009-01-19 00:00:00' AND published < '2019-01-19 23:59:59' O' at line 8