Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

which table is the category ID stored in? 
 
greggsand
Jr. Member
 
Avatar
Total Posts:  29
Joined:  2008-04-19
 

There are 7 different tables relating to category and I’m not clear on which table/column is the category id column. Can anyone shed some light on this mystery for me?

Gregg

 
Magento Community Magento Community
Magento Community
Magento Community
 
gabrielk
Sr. Member
 
Avatar
Total Posts:  83
Joined:  2007-11-30
 

catalog_category_entity is the “key” table, entity_id is the category’s id.  You’ll find the name of the category in catalog_category_entity_varchar.value where catalog_category_entity_varchar.entity_id=catalog_category_entity.entity_id.  If you want to know what each “value” is in catalog_category_entity_varchar/text/int/etc, tie in eav_attribute where catalog_category_entity_(int/varchar/text/etc).attribute_id=eav_attribute.attribute_id.

Just FYI, products, customers, orders, etc., are all handled in a very similar fashion.  Also, multiselect attributes are stored in foo_bar_entity_int, where the interger value equals eav_attribute_option_value.value_id.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top