Skip to content

Instantly share code, notes, and snippets.

@benytocarlo
Created August 4, 2015 19:00
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 benytocarlo/0081abd4a3a6e6c7a0b7 to your computer and use it in GitHub Desktop.
Save benytocarlo/0081abd4a3a6e6c7a0b7 to your computer and use it in GitHub Desktop.
Imagenes de Productos Magento
SELECT *
FROM `catalog_product_entity` AS a
INNER JOIN `eav_attribute` AS `attribute` ON `attribute`.attribute_code = 'image'
AND `attribute`.frontend_input = 'media_image'
LEFT JOIN `catalog_product_entity_varchar` AS b ON a.entity_id = b.entity_id
AND b.attribute_id = attribute.attribute_id
WHERE `type_id` = 'simple' AND (b.value = ''
OR b.value IS NOT NULL
OR b.value != 'no_selection')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment