Wednesday 27 January 2016

To know the attribute id of a attribute code in magento2 using sql query

select attribute_id from eav_attribute WHERE entity_type_id = (select entity_type_id from eav_entity_type WHERE entity_type_code = '<entity>') AND attribute_code = '<code>'


Example:

select attribute_id from eav_attribute WHERE entity_type_id = (select entity_type_id from eav_entity_type WHERE entity_type_code = 'catalog_category') AND attribute_code = 'display_mode'

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home