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 '' at line 7
SELECT t.id_tratamiento, tl.nombre_tratamiento_translation, tl.url_tratamiento_translation, tl.nota_tratamiento_translation, tl.descripcion_tratamiento_translation, tl.embed_tratamiento_translation, tl.carpeta_tratamiento_translation, t.fecha_tratamiento FROM `tratamiento` t INNER JOIN tratamiento_translation tl ON tl.id_tratamiento = t.id_tratamiento INNER JOIN lang l ON l.lang = tl.lang WHERE t.id_empresa=4 AND NOT t.estado = 'S' AND l.lang = 'en' ORDER BY t.orden_tratamiento ASC, t.`fecha_tratamiento` DESC LIMIT 0,