You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by stt,ngaytao desc' at line 1syntax error: select ten_vi as ten,tenkhongdau,mota_vi as mota,thumb,photo,id,ngaytao,luotxem from table_news where hienthi=1 and loaitin='tin-tuc' and id_item= order by stt,ngaytao desc