SQL ERROR: 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 'OR gamme_parentid= )) AND (offrePrix_nbVenteRestant > 0 OR offrePrix_nbV' at line 3
SELECT count(*) as nbr_offres FROM offres left join offre_prix on offre_id=offrePrix_offreId WHERE offre_gammeId IN(SELECT gamme_id FROM gammes WHERE (gamme_id= OR gamme_parentid= )) AND (offrePrix_nbVenteRestant > 0 OR offrePrix_nbVenteRestant IS NULL) AND offrePrix_datetimeDebut <= '2012-05-20 11:43:57' AND (offrePrix_datetimeFin IS NULL OR offrePrix_datetimeFin >= '2012-05-20 11:43:57');
SQL ERROR: 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 'OR gamme_parentid= )) AND (offrePrix_nbVenteRestant > 0 OR offrePrix_n' at line 27
SELECT offre_id, offre_nom, offre_priorite, offreProduit_id, offreProduit_quantite, offreProduit_produitId, produit_id, produit_nom, produit_poids, produit_enCrossDock, produit_stock, offrePrix_prixNormal, offrePrix_prix, offrePrix_datetimeDebut, offrePrix_datetimeFin, produitVisu_produitId, produitVisu_fichier, produit_stock, offre_visuFichier FROM offres LEFT JOIN offre_produits ON offre_id = offreProduit_offreId LEFT JOIN produits ON offreProduit_produitId = produit_id LEFT JOIN offre_prix ON offre_id = offrePrix_offreId LEFT JOIN produit_visus ON produit_visuDefautId = produitVisu_id WHERE offre_gammeId IN (SELECT gamme_id FROM gammes WHERE (gamme_id= OR gamme_parentid= )) AND (offrePrix_nbVenteRestant > 0 OR offrePrix_nbVenteRestant IS NULL) AND offrePrix_datetimeDebut <= '2012-05-20 11:43:57' AND (offrePrix_datetimeFin IS NULL OR offrePrix_datetimeFin >= '2012-05-20 11:43:57') GROUP BY offre_id ORDER BY offre_priorite DESC, produit_nom limit 0,9