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 ')' at line 1 (select count(*) as count from news where type in('TEXT','FILE','URL') and accepted=1 and deleted=0 and (publishdate<='1627850191') and ())