ERROR: syntax error at or near ")" LINE 5: AND a.entry_id IN () ^
SELECT a.*,b.entry_year FROM entry_media a,entry b WHERE a.entry_id = b.id AND a.is_deleted = 0 AND a.entry_id IN () ORDER BY a.media_type,a.sort_order,a.file_name