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 images.conteneur='produit' AND images.original='' AND produits.removed='0'' at line 1 SELECT produits.id AS idProduit, produits.titre AS titre, produits.prixTTC AS prixTTC, produits.promoDateDeb AS promoDateDeb, produits.promoDateFin AS promoDateFin,produits.tauxPromo AS tauxPromo, produits.quantiteStock AS quantiteStock, produits.numOptions AS numOptions, pages.absoluteURL AS absoluteURL, images.nom AS img FROM produits INNER JOIN pages ON pages.idExtra=produits.id INNER JOIN images ON images.idConteneur=produits.id WHERE pages.id IN () AND images.conteneur='produit' AND images.original='' AND produits.removed='0' GROUP BY produits.id ORDER BY produits.titre asc