Standard Message: DB Error: syntax error DBMS/User Message: SELECT COUNT(announce.id) AS num_items FROM announce INNER JOIN (SELECT announce_nodes.* FROM announce_nodes WHERE announce_nodes.node_id IN ( )) AS aan ON aan.announce_id = announce.id WHERE (1) AND status = 'Approved' AND (publish_date < '2014-10-23 16:47:05') AND ( archive_date = '0000-00-00 00:00:00' OR archive_date > '2014-10-23 16:47:05' ) GROUP BY announce.id [nativecode=1064 ** 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 ')) AS aan ON aan.announce_id = announce.id WHERE (1) AND status = 'Approved' ' at line 2] DBMS/Debug Message: SELECT COUNT(announce.id) AS num_items FROM announce INNER JOIN (SELECT announce_nodes.* FROM announce_nodes WHERE announce_nodes.node_id IN ( )) AS aan ON aan.announce_id = announce.id WHERE (1) AND status = 'Approved' AND (publish_date < '2014-10-23 16:47:05') AND ( archive_date = '0000-00-00 00:00:00' OR archive_date > '2014-10-23 16:47:05' ) GROUP BY announce.id [nativecode=1064 ** 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 ')) AS aan ON aan.announce_id = announce.id WHERE (1) AND status = 'Approved' ' at line 2]