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