Skip to content

Instantly share code, notes, and snippets.

@steveosoule
Created April 24, 2014 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steveosoule/11265951 to your computer and use it in GitHub Desktop.
Save steveosoule/11265951 to your computer and use it in GitHub Desktop.
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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment