Error on query SELECT carti.id FROM carti WHERE vizibilitate=1 AND id_editura= ORDER BY carti.nota DESC, carti.nume ASC . Err desc: 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 carti.nota DESC, carti.nume ASC' at line 1