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 ',661,1558,469,2730) order by newstime' at line 1 select id,classid,tagid from ***_jfmoretags_jf_ziku where tagid in(245,140,43,1485,,,661,1558,469,2730) order by newstime