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 ') group by id_list order by stt' at line 1syntax error: select id_list,tenkhongdau_vi from table_news where hienthi =1 and com='tailieu' and id_sub='1' and id IN () group by id_list order by stt