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_list=122 order by stt,id desc' at line 1syntax error: select id,tenkhongdau,ten_vi as ten,thumb,photo,mota_vi as mota, id_list, id_cat, id_item, gia,giakm, ngaybatdau, ngayketthuc from table_product where hienthi =1 and id_cat= and id_list=122 order by stt,id desc