Re: MySQL database question
Quote:
Originally Posted by
blakdeth77
Is entering a statement to the Install SQL Patches input field and running it going to damage my database? I was suggested this command by another user here and he was unsure if this command would delete the GroupID 0 and cause harm to the original functionality of the web site. Can anyone clue me in as to whether this would cause my site to undergo an "epic failure"? :smile:
Code:
DELETE FROM `configuration` WHERE `configuration_group_id` = 0;
Be careful doing that. It might be wise to review which records a SELECT would return (instead of DELETE) and determine why there's a need to remove anything.
The IMPORTANT question really is WHY are you doing this???????
Regardless your approach ... BEFORE you EVER do any direct database manipulation, you should ALWAYS do a FULL database BACKUP!!!
Re: MySQL database question
NOTE: There are 3 valid entries for configurations_group_id = 0 ... so be sure to re-add them when you have cleaned up your messies ...
Code:
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Product option type Select', 'PRODUCTS_OPTIONS_TYPE_SELECT', '0', 'The number representing the Select type of product option.', 0, NULL, now(), now(), NULL, NULL);
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Upload prefix', 'UPLOAD_PREFIX', 'upload_', 'Prefix used to differentiate between upload options and other options', 0, NULL, now(), now(), NULL, NULL);
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Text prefix', 'TEXT_PREFIX', 'txt_', 'Prefix used to differentiate between text option values and other option values', 0, NULL, now(), now(), NULL, NULL);
And, as DrByte strongly suggested, be sure to backup BEFORE attempting this ... :smile: