Error Number: 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 'AND t.status = 'open' AND t.status != 'closed'' at line 2

SELECT t.entry_id FROM exp_channel_titles AS t LEFT JOIN exp_channels ON t.channel_id = exp_channels.channel_id LEFT JOIN exp_members AS m ON m.member_id = t.author_id WHERE t.entry_id !='' AND t.site_id IN ('1') AND t.entry_date < 1711648037 AND (t.expiration_date = 0 OR t.expiration_date > 1711648037) AND t.channel_id IN (9) AND t.entry_date >= 347155200 AND t.entry_date <= AND t.status = 'open' AND t.status != 'closed'