select p.* from table_product p,table_product_size_condition ps where 1 and type='product' and ps.id_product = p.id and ps.id_size in () and p.hienthi = 1 group by id order by stt desc 1064: 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 p.hienthi = 1 group by id order by stt desc' at line 1