Skip to content

Instantly share code, notes, and snippets.

View mathiasgrimm's full-sized avatar

Mathias Grimm mathiasgrimm

View GitHub Profile
@mathiasgrimm
mathiasgrimm / Category.sql
Created November 18, 2016 12:59 — forked from ticean/Category.sql
A series of queries for selecting Magento entity EAV attributes, and their values. Lots of union here...
SET @entityid = '3';
SELECT ea.attribute_id, ea.attribute_code, eav.value AS 'value', 'varchar' AS 'type'
FROM catalog_category_entity e
JOIN catalog_category_entity_varchar eav
ON e.entity_id = eav.entity_id
JOIN eav_attribute ea
ON eav.attribute_id = ea.attribute_id
WHERE e.entity_id = @entityid
UNION