Error consulta SELECT d.idDocument FROM documents d LEFT JOIN documentsEtiquetes de ON d.idDocument=de.idDocument WHERE 1 AND d.classe2='Notícia' AND de.idTipusEtiqueta=1 AND d.esPublicacioWeb=1 AND d.esBaixa=0 AND d.paraulesClau LIKE '%d'imatges,%' ORDER BY d.dataInici DESC : 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 'imatges,%' ORDER BY d.dataInici DESC' at line 1