database - magento table that stores relation between cms_block and categories -


in magento, need run query find out categories have static block assigned. know static blocks stored in cms_block, , categories stored. however, table joins these 2 in database? or foreign key field in category table?

enter image description here

categories eav model, so, should indeed @ table join.
here request looking :

select cat.*, cms.* `catalog_category_entity` cat     join `catalog_category_entity_int` ci on cat.entity_id = ci.`entity_id`     join `eav_attribute` att on att.`attribute_id` = ci.`attribute_id`     join `cms_block` cms on cms.`block_id` = ci.`value`     att.`attribute_code` = 'landing_page' 

alan storm, has great article (as usual) on blog if want dig deeper magento eav structure : http://alanstorm.com/magento_advanced_orm_entity_attribute_value_part_1


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -