Delete all unused attribute options.
Attemping to delete all unused attribute options from my magento 1.4.2 store. What join am I missing?
Edit: Am I deleting from the wrong table?
delete eaov
from eav_attribute_option_value eaov
inner join eav_attribute_option eao on eaov.option_id = eao.option_id
inner join eav_attribute ea on ea.attribute_id = eao.attribu开发者_开发问答te_id
left join catalog_product_index_eav ce
on ce.attribute_id = ea.attribute_id and ce.value = eaov.option_id
where ce.entity_id is null
Check the comment below for the proper answer.
精彩评论