Invalid query: select id,image_name,event_date,artist_name,event_name,open,close,play,ticket_id,inquiry,ticket_inquiry,today_price,price,remark from schedule_tbl where id IN () and status=1 ORDER BY event_date ASC 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 status=1 ORDER BY event_date ASC' at line 1