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 'WHERE d.status!='auto_save' AND d.sdate<='1500097205' AND d.edate>='1500090005' ' at line 1Nothing to show :(