Last active
April 21, 2016 13:52
-
-
Save victordit/575aa58075e1a0e8ca96edb31bae0e0b to your computer and use it in GitHub Desktop.
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
-- Search products descriptions | |
SELECT | |
cpe.entity_id, | |
cpe.sku, | |
cs.name as store, | |
cpet_d.value as description, | |
cpet_sd.value as short_description | |
FROM `catalog_product_entity` as cpe | |
LEFT JOIN `eav_attribute` as ea | |
ON ea.attribute_code = 'description' AND ea.entity_type_id = 4 | |
OR ea.attribute_code = 'short_description' AND ea.entity_type_id = 4 | |
LEFT JOIN `catalog_product_entity_text` as cpet_d | |
ON cpe.entity_id = cpet_d.entity_id | |
AND cpet_d.attribute_id = ea.attribute_id | |
AND ea.attribute_code = 'description' | |
LEFT JOIN `catalog_product_entity_text` as cpet_sd | |
ON cpe.entity_id = cpet_sd.entity_id | |
AND cpet_sd.attribute_id = ea.attribute_id | |
AND ea.attribute_code = 'short_description' | |
LEFT JOIN `core_store` as cs | |
ON cpet_d.store_id = cs.store_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment