All pastes #2076950 Raw Edit

Stuff

public text v1 · immutable
#2076950 ·published 2011-06-08 21:18 UTC
rendered paste body
SELECT
	COUNT(*)
FROM
	products
	LEFT JOIN prod_alltoys ON products.supnum = prod_alltoys.cataloguenumber
	LEFT JOIN prod_images ON products.id = prod_images.id_prod
WHERE
	products.active = '1' AND
	d1 >= 0
GROUP BY
	products.id
HAVING
	pImages = 0