Skip to content

Instantly share code, notes, and snippets.

@trabulium
Created May 18, 2018 00:04
Show Gist options
  • Save trabulium/49c4d12da80703e9e3278ec743396831 to your computer and use it in GitHub Desktop.
Save trabulium/49c4d12da80703e9e3278ec743396831 to your computer and use it in GitHub Desktop.
Bulk Update "Is Anchor" based on parent id
#select * from catalog_category_entity_int
UPDATE catalog_category_entity_int
SET value = 1
WHERE attribute_id = (SELECT attribute_id
FROM eav_attribute
WHERE attribute_code = 'is_anchor'
LIMIT 1)
AND entity_id in (select entity_id from catalog_category_entity where path like ('2297%')) and value = 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment