SELECT _articles.*, _prix.* FROM _articles
INNER JOIN _prix ON _articles.id_article = _prix.id_article
INNER JOIN _categories ON _articles.id_article = _categories.id_article
LEFT OUTER JOIN _articles_forcingVEL AFVL ON AFVL.id_article = _articles.id_article
WHERE
(
(_articles.actif = 1 AND _prix.actif = 1)
OR
(AFVL.actif = 1 AND AFVL.PTTC > 0 )
)
AND _categories.id_categorieA = '1000' AND _categories.id_categorieB = '1012' GROUP BY _articles.id_article
ORDER BY reference ASC
Aucun article