steveosoule
4/24/2014 - 7:10 PM

Miva Merchant - Select all Generated Images For Specific Product & Image Type

Miva Merchant - Select all Generated Images For Specific Product & Image Type

SELECT * FROM s01_Products AS prod
JOIN s01_ProductImages AS pimg
	ON pimg.product_id = prod.id
JOIN s01_Images AS img
	ON img.id = pimg.image_id
JOIN s01_ImageTypes AS type
	ON type.id = pimg.type_id
JOIN s01_GeneratedImages AS gimg
	ON gimg.image_id = img.id
WHERE prod.id = '33954'
	AND type.code = 'image_01'