/ Published in: SQL
After transferring a magento databse or restoring one, you'll most likely have to run this code to correct a few IDs that change automaticly.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
SET FOREIGN_KEY_CHECKS = 0; UPDATE `core_store` SET `store_id` = 0 WHERE `code` LIKE 'admin'; UPDATE `core_website` SET `website_id` = 0 WHERE `code` LIKE 'admin'; UPDATE `customer_group` SET `customer_group_id` = 0 WHERE `customer_group_code` LIKE 'NOT LOGGED IN'; SET FOREIGN_KEY_CHECKS = 1;