Guest User

Untitled

a guest
Oct 20th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. SET
  2. @store := 1,
  3. @name_id := 71,
  4. @short_desc_id := 72,
  5. @desc_id := 73;
  6.  
  7. SELECT
  8. CPE.sku AS sku,
  9. CPEVN.value AS name,
  10. CPEVSD.value AS short_description,
  11. CPEVD.value AS description
  12. FROM catalog_product_entity AS CPE
  13. LEFT JOIN catalog_product_entity_varchar AS CPEVN
  14. ON (CPE.entity_id = CPEVN.entity_id
  15. AND CPEVN.attribute_id = @name_id
  16. AND CPEVN.store_id = @store)
  17. LEFT JOIN catalog_product_entity_varchar AS CPEVSD
  18. ON (CPE.entity_id = CPEVSD.entity_id
  19. AND CPEVSD.attribute_id = @short_desc_id
  20. AND CPEVSD.store_id = @store)
  21. LEFT JOIN catalog_product_entity_varchar AS CPEVD
  22. ON (CPE.entity_id = CPEVD.entity_id
  23. AND CPEVD.attribute_id = @desc_id
  24. AND CPEVD.store_id = @store);
Add Comment
Please, Sign In to add comment