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 'AND noibat>0 AND type='san-pham' ORDER BY stt,id DESC LIMIT 0,' at line 1syntax error: SELECT tenvi, motavi, tenkhongdau, id, photo, gia, giagiam FROM table_product WHERE hienthi=1 AND id_cat= AND noibat>0 AND type='san-pham' ORDER BY stt,id DESC LIMIT 0,