Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Sep 2010
    Location
    Cahokia, IL
    Posts
    19
    Plugin Contributions
    0

    application error HELP! Undo an SQL statement file?

    I have a problem cause by my own in-attention. I was messing around with a test site (one those free sites) to try out some new modules and templates, etc. I installed the template, and needed to run the included .sql file. Not paying close attention, I logged into my regular site and ran the file. Now my site is messed up and dont know how to undo the changes.

    Since I was planning on changing my main site, I didn't run a backup on the database.
    I have seen other templates and mods that an uninstall sql file - will something like this work if I just rename from sql_install.sql to uninstall_sql_install.sql or something like that?

    The configuration changes I change back in the admin, but not sure about the INSERT INTO sections.

    Need help soon. Thanks in advance!

    Below is a list of the changes made in the .sql file:

    /** install single listing **/
    delete from configuration where configuration_key in('PRODUCT_LISTING_LAYOUT_STYLE','PRODUCT_LISTING_COLUMNS_PER_ROW');

    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 Listing - Layout Style', 'PRODUCT_LISTING_LAYOUT_STYLE', 'rows', 'Select the layout style:<br />Each product can be listed in its own row (rows option) or products can be listed in multiple columns per row (columns option)', '8', '40', NULL, now(), NULL, 'zen_cfg_select_option(array("rows", "columns"),');

    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 Listing - Columns Per Row', 'PRODUCT_LISTING_COLUMNS_PER_ROW', '3', 'Select the number of columns of products to show in each row in the product listing. The default setting is 3.', '8', '41', NULL, 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
    ('Index New Listing Template', 'INDEX_NEW_USE_PRODUCT_LISTING', '1', 'Set to 1 to use the original listing template, 2 to use the shared listing template, 3 to use the product listing template.', 24, 1, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''1'', ''2'', ''3''),'),
    ('Index Special Listing Template', 'INDEX_SPECIAL_USE_PRODUCT_LISTING', '1', 'Set to 1 to use the original listing template, 2 to use the shared listing template, 3 to use the product listing template.', 24, 1, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''1'', ''2'', ''3''),'),
    ('Index Featured Listing Template', 'INDEX_FEATURED_USE_PRODUCT_LISTING', '1', 'Set to 1 to use the original listing template, 2 to use the shared listing template, 3 to use the product listing template.', 24, 1, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''1'', ''2'', ''3''),');

    /** CJ Loader **/

    SET @t4=0;
    SELECT (@t4:=configuration_group_id) as t4
    FROM configuration_group
    WHERE configuration_group_title= 'CSS/JS Loader';
    DELETE FROM configuration WHERE configuration_group_id = @t4;
    DELETE FROM configuration_group WHERE configuration_group_id = @t4;

    INSERT INTO configuration_group VALUES ('', 'CSS/JS Loader', 'Set CSS/JS Loader Options', '1', '1');
    UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();

    SET @t4=0;
    SELECT (@t4:=configuration_group_id) as t4
    FROM configuration_group
    WHERE configuration_group_title= 'CSS/JS Loader';

    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
    ('Enable Minify', 'MINIFY_STATUS', 'true', 'Minifying will speed up your site\'s loading speed by combining and compressing css/js files.', @t4, 1, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
    ('Max URL Lenght', 'MINIFY_MAX_URL_LENGHT', '2083', 'On some server the maximum lenght of any POST/GET request URL is limited. If this is the case for your server, you can change the setting here', @t4, 2, NOW(), NOW(), NULL, NULL),
    ('Minify Cache Time', 'MINIFY_CACHE_TIME_LENGHT', '31536000', 'Set minify cache time (in second). Default is 1 year (31536000)', @t4, 3, NOW(), NOW(), NULL, NULL),
    ('Latest Cache Time', 'MINIFY_CACHE_TIME_LATEST', '0', 'Normally you don\'t have to set this, but if you have just made changes to your js/css files and want to make sure they are reloaded right away, you can reset this to 0.', @t4, 4, NOW(), NOW(), NULL, NULL);

    /** update configuration **/

    UPDATE configuration SET configuration_value = '4' WHERE configuration_key = 'MAX_DISPLAY_NEW_PRODUCTS';
    UPDATE configuration SET configuration_value = '1' WHERE configuration_key = 'MAX_MANUFACTURERS_LIST';
    UPDATE configuration SET configuration_value = '250' WHERE configuration_key = 'MEDIUM_IMAGE_WIDTH';
    UPDATE configuration SET configuration_value = '250' WHERE configuration_key = 'MEDIUM_IMAGE_HEIGHT';
    UPDATE configuration SET configuration_value = '125' WHERE configuration_key = 'IMAGE_PRODUCT_LISTING_WIDTH';
    UPDATE configuration SET configuration_value = '125' WHERE configuration_key = 'IMAGE_PRODUCT_LISTING_HEIGHT';
    UPDATE configuration SET configuration_value = '0' WHERE configuration_key = 'IMAGE_PRODUCT_ALL_LISTING_WIDTH';
    UPDATE configuration SET configuration_value = '160' WHERE configuration_key = 'IMAGE_PRODUCT_ALL_LISTING_HEIGHT';
    UPDATE configuration SET configuration_value = '1' WHERE configuration_key = 'PRODUCT_LIST_IMAGE';
    UPDATE configuration SET configuration_value = '2' WHERE configuration_key = 'PRODUCT_LIST_NAME';
    UPDATE configuration SET configuration_value = '0' WHERE configuration_key = 'PRODUCT_LISTING_MULTIPLE_ADD_TO_CART';
    UPDATE configuration SET configuration_value = '0' WHERE configuration_key = 'PRODUCT_LIST_DESCRIPTION';
    UPDATE configuration SET configuration_value = '0' WHERE configuration_key = 'OTHER_IMAGE_PRICE_IS_FREE_ON';
    UPDATE configuration SET configuration_value = '0' WHERE configuration_key = 'PRODUCT_INFO_PREVIOUS_NEXT';
    UPDATE configuration SET configuration_value = '0' WHERE configuration_key = 'PRODUCT_INFO_CATEGORIES';
    UPDATE configuration SET configuration_value = '220px' WHERE configuration_key = 'BOX_WIDTH_LEFT';
    UPDATE configuration SET configuration_value = '0' WHERE configuration_key = 'COLUMN_RIGHT_STATUS';
    UPDATE configuration SET configuration_value = '220px' WHERE configuration_key = 'COLUMN_WIDTH_LEFT';
    UPDATE configuration SET configuration_value = '0' WHERE configuration_key = 'SHOW_CUSTOMER_GREETING';
    UPDATE configuration SET configuration_value = '' WHERE configuration_key = 'SHOW_BANNERS_GROUP_SET6';
    UPDATE configuration SET configuration_value = '0' WHERE configuration_key = 'SHOW_FOOTER_IP';
    UPDATE configuration SET configuration_value = 'No' WHERE configuration_key = 'IMAGE_USE_CSS_BUTTONS';
    UPDATE configuration SET configuration_value = '0' WHERE configuration_key = 'PRODUCT_NEW_LIST_IMAGE';
    UPDATE configuration SET configuration_value = '2101' WHERE configuration_key = 'PRODUCT_NEW_LIST_NAME';
    UPDATE configuration SET configuration_value = '0' WHERE configuration_key = 'PRODUCT_NEW_LISTING_MULTIPLE_ADD_TO_CART';
    UPDATE configuration SET configuration_value = '0' WHERE configuration_key = 'PRODUCT_FEATURED_LIST_IMAGE';
    UPDATE configuration SET configuration_value = '0' WHERE configuration_key = 'PRODUCT_ALL_LIST_IMAGE';
    UPDATE configuration SET configuration_value = '1101' WHERE configuration_key = 'PRODUCT_ALL_LIST_NAME';
    UPDATE configuration SET configuration_value = '0' WHERE configuration_key = 'PRODUCT_ALL_LISTING_MULTIPLE_ADD_TO_CART';
    UPDATE configuration SET configuration_value = '1' WHERE configuration_key = 'SHOW_PRODUCT_INFO_MAIN_FEATURED_PRODUCTS';
    UPDATE configuration SET configuration_value = '0' WHERE configuration_key = 'SHOW_PRODUCT_INFO_MAIN_SPECIALS_PRODUCTS';
    UPDATE configuration SET configuration_value = '0' WHERE configuration_key = 'SHOW_PRODUCT_INFO_MAIN_UPCOMING';
    UPDATE configuration SET configuration_value = '0' WHERE configuration_key = 'DEFINE_MAIN_PAGE_STATUS';
    UPDATE configuration SET configuration_value = '1' WHERE configuration_key = 'EZPAGES_STATUS_FOOTER';
    UPDATE configuration SET configuration_value = '3' WHERE configuration_key = 'INDEX_NEW_USE_PRODUCT_LISTING';
    UPDATE configuration SET configuration_value = '3' WHERE configuration_key = 'INDEX_SPECIAL_USE_PRODUCT_LISTING';
    UPDATE configuration SET configuration_value = '3' WHERE configuration_key = 'INDEX_FEATURED_USE_PRODUCT_LISTING';
    UPDATE configuration SET configuration_value = 'columns' WHERE configuration_key = 'PRODUCT_LISTING_LAYOUT_STYLE';
    UPDATE configuration SET configuration_value = '4' WHERE configuration_key = 'PRODUCT_LISTING_COLUMNS_PER_ROW';
    [FONT="Comic Sans MS"]Matt Doty
    www.MoodBoosters.net
    "It's better to be a Smart A$$ than a Dumb A$$[/FONT]

  2. #2
    Join Date
    Jan 2010
    Location
    Australia
    Posts
    239
    Plugin Contributions
    1

    Default Re: HELP! Undo an SQL statement file?

    ask your web hosting provider if they have any backup of your sql
    Believe it or not But My existence is illusional

  3. #3
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,267
    Plugin Contributions
    3

    Default Re: HELP! Undo an SQL statement file?

    Go to your admin console, CONFIGURATION MENU and look for css/js loader.

    Then set MINIFY to FALSE.

    This may be a temp fix.
    20 years a Zencart User

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,267
    Plugin Contributions
    3

    Default Re: HELP! Undo an SQL statement file?

    Your problem is these things...

    UPDATE configuration SET configuration_value = '4' WHERE configuration_key = 'MAX_DISPLAY_NEW_PRODUCTS';
    UPDATE configuration SET configuration_value = '1' WHERE configuration_key = 'MAX_MANUFACTURERS_LIST';
    UPDATE configuration SET configuration_value = '250' WHERE configuration_key = 'MEDIUM_IMAGE_WIDTH';
    UPDATE configuration SET configuration_value = '250' WHERE configuration_key = 'MEDIUM_IMAGE_HEIGHT';

    (ETC...)

    You have instructed the database to UPDATE a range of settings, and the only way to get them back to what you had before is to either run another UPDATE sequence where the values are what you had originally, OR you go into your admin panel and re-set the values in the Configuration menus.
    20 years a Zencart User

 

 

Similar Threads

  1. Where to find the file that changes headings? Trying to undo some addons
    By luvstoxstitch in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 3 Aug 2011, 04:17 AM
  2. Help - Remove sql statement
    By CharInLasVegas in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 28 Nov 2009, 10:39 PM
  3. undo SQL
    By Veronika7747 in forum General Questions
    Replies: 4
    Last Post: 16 Jan 2008, 06:44 AM
  4. Replies: 7
    Last Post: 5 Nov 2007, 12:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg