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 id_item= order by noibat,stt,ngaytao asc limit 0,8' at line 1syntax error: select id,thumb,photo,ten_vi,tenkhongdau,maso,luotxem,ngaytao from table_tintuc where hienthi=1 and id <>'36' and id_cat= and id_item= order by noibat,stt,ngaytao asc limit 0,8