-
-
Save Zifius/d10cc1490bf953d7632d to your computer and use it in GitHub Desktop.
Query to get all gallery images with position and disabled flag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT DISTINCT b.value, a.sku, c.position, c.disabled | |
FROM `catalog_product_entity` AS a | |
LEFT JOIN `catalog_product_entity_media_gallery` AS b ON a.entity_id = b.entity_id | |
INNER JOIN `catalog_product_entity_media_gallery_value` AS c ON c.value_id = b.value_id | |
ORDER BY a.sku, c.position |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment