You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and art_id=2211 and publie like 'oui' order by datecom DESC' at select * from commentaires where rubrique_id= and art_id=2211 and publie like 'oui' order by datecom DESC