SELECT *, (SELECT zona FROM cms_zonas WHERE id_zona = cms_propiedades.id_zona) AS zona_texto, (SELECT tipo_en FROM cms_tipos WHERE id_tipo = cms_propiedades.id_tipo) AS tipo_texto FROM cms_propiedades WHERE visible ORDER BY destacado DESC, id_propiedad DESC LIMIT -8, 8 - 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 '-8, 8' at line 1