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 art_id=2211 and publie like 'oui' order by datecom DESC' at line 1select * from commentaires where rubrique_id= and art_id=2211 and publie like 'oui' order by datecom DESC