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 fa.producto=3 ORDER BY ge.novedad DESC,ge.fecha_subida DESC' at line 1