Error Query en select * from clases_por_curso where sys_delete is null and curso= order by nro asc 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 nro asc' at line 1