The workshop equipment to make your life easier: vices, anvil, servants, established mobile media.
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 = '3010' GROUP BY _articles.id_article
ORDER BY reference ASC