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