You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '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=130 and id_list= order by stt,id desc