If this is your first visit, check our documentation. To post, register or login.
Forums / Customization from the Admin / Major error in SQL process

Major error in SQL process

Started by dix30simulation on 19 Oct 2012, 5:26 PM · Views: 1,346

Results 1 to 8 of 8
19 Oct 2012, 5:26 PM
#1
dix30simulation avatar

dix30simulation

New Zenner

Join Date:
Aug 2012
Location:
Montreal, Canada
Posts:
30
Plugin Contributions:
0

Major error in SQL process

Hello,

After installing few plugins, I keep getting the same error over and over.:(

Attachment 11334

Never mind the plugins and how many statements it did write, so I looked around and seems to be a common error as describred below.

Attachment 11335

and this came out of nowhere, did not modify anything on my server at all. Although I approached my ISP IT tech to look at my SQL, I thought I would drop a note here cause I am kind of Stuck now! :no:

I use v1.50

Thanks in advance for your help

Dan

19 Oct 2012, 6:53 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Major error in SQL process

Really can't help you if we don't know what SQL statements you're trying to run.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

19 Oct 2012, 7:49 PM
#3
dix30simulation avatar

dix30simulation

New Zenner

Join Date:
Aug 2012
Location:
Montreal, Canada
Posts:
30
Plugin Contributions:
0

Re: Major error in SQL process

It all started with the plugin: carousel_featured_products_ v1
...:(

19 Oct 2012, 11:42 PM
#4
dix30simulation avatar

dix30simulation

New Zenner

Join Date:
Aug 2012
Location:
Montreal, Canada
Posts:
30
Plugin Contributions:
0

Re: Major error in SQL process

SELECT @cid:=configuration_group_id
FROM configuration_group
WHERE configuration_group_title= 'Carousel Featured Products';
DELETE FROM configuration WHERE configuration_group_id = @cid;
DELETE FROM configuration_group WHERE configuration_group_id = @cid;
INSERT INTO configuration_group VALUES (NULL, 'Carousel Featured Products', 'Set Carousel Featured Products Options', '1', '1');
SET @cid=last_insert_id();
UPDATE configuration_group SET sort_order = @cid WHERE configuration_group_id = @cid;
INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES
(NULL, 'Carousel Featured Products', 'CAROUSEL_FEATURED_PRODUCTS', 'true', 'Display your featured products in a carousel?<br /><br/>Default = true<br/>', @cid, 101, 'zen_cfg_select_option(array('true', 'false'), ', now()),
(NULL, 'Maximum Display Carousel Featured Products', 'MAX_DISPLAY_SEARCH_RESULTS_CAROUSEL_FEATURED', '10', 'Set this to how many featured products you have - regardless of the number, only three will show on the carousel at a time.<br/><br/>Default = 10<br/>', @cid, 102, NULL, now()),
(NULL, 'Display Description', 'CAROUSEL_FEATURED_DESCRIPTION', 'true', 'Display featured products description?<br/><br/>Default = true<br/>', @cid, 105, 'zen_cfg_select_option(array('true', 'false'), ', now()),
(NULL, 'Description Length', 'CAROUSEL_FEATURED_DESCRIPTION_LENGTH', '100', '--ONLY APPLICABLE IF DISPLAY DISCRIPTION IS TRUE--<br/><br/>Featured product description length in chatacters<br/><br/>Default = 100<br/>', @cid, 106, NULL, now()),
(NULL, 'Display Button', 'CAROUSEL_FEATURED_LINK', 'true', 'Display "Buy Now" or "More Information" buttons?<br/><br/>Default = true<br/>', @cid, 107, 'zen_cfg_select_option(array('true', 'false'), ', now()),
(NULL, 'Display Price', 'CAROUSEL_FEATURED_PRICE', 'true', 'Display featured product price?<br/><br/>Default = true<br/>', @cid, 107, 'zen_cfg_select_option(array('true', 'false'), ', now()),
(NULL, 'Carousel Featured Image Listing Width', 'IMAGE_CAROUSEL_FEATURED_PRODUCTS_LISTING_WIDTH', '100', 'The width of the product images in the carousel.<br/>Default = 100', @cid, 108, NULL, now()),
(NULL, 'Carousel Featured Image Listing Height', 'IMAGE_CAROUSEL_FEATURED_PRODUCTS_LISTING_HEIGHT', '80', 'The height of the product images in the carousel.<br/>Default = 80', @cid, 109, NULL, now());

Register the configuration page for Admin Access Control

INSERT IGNORE INTO admin_pages (page_key,language_key,main_page,page_params,menu_key,display_on_menu,sort_order) VALUES ('configCarouselFeatured','BOX_CONFIGURATION_CAROUSEL','FILENAME_CONFIGURATION',CONCAT('gID=',@cid),'configuration','Y',@cid);

12 Nov 2012, 1:33 PM
#5
dturnertms avatar

dturnertms

New Zenner

Join Date:
Nov 2012
Posts:
18
Plugin Contributions:
0

Re: Major error in SQL process

It looks like there is a missing bracket in some of the VALUES lines :

'zen_cfg_select_option(array('true','false'), ' should read

'zen_cfg_select_option(array('true','false'))' in

(NULL, 'Carousel Featured Products', 'CAROUSEL_FEATURED_PRODUCTS', 'true', 'Display your featured products in a carousel?<br /><br/>Default = true<br/>', @cid, 101, 'zen_cfg_select_option(array('true', 'false'), ', now())

12 Nov 2012, 6:14 PM
#6
dix30simulation avatar

dix30simulation

New Zenner

Join Date:
Aug 2012
Location:
Montreal, Canada
Posts:
30
Plugin Contributions:
0

Re: Major error in SQL process

Thanks for your reply but this does not clear the problem,

I also updated the .sql as seen below and still the same error...:(. Been on the phone with the IT tech of my ISP and they also have no clue

While uploading that query via my ISP Admin panel rather than Zencart admin panel, I get the following error here:
DELETE FROM configuration WHERE configuration_group_id = @cid;

*SELECT @cid:=configuration_group_id
FROM configuration_group
WHERE configuration_group_title= 'Carousel Featured Products';
DELETE FROM configuration WHERE configuration_group_id = @cid;
DELETE FROM configuration_group WHERE configuration_group_id = @cid;
INSERT INTO configuration_group VALUES (NULL, 'Carousel Featured Products', 'Set Carousel Featured Products Options', '1', '1');
SET @cid=last_insert_id();
UPDATE configuration_group SET sort_order = @cid WHERE configuration_group_id = @cid;
INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES
(NULL, 'Carousel Featured Products', 'CAROUSEL_FEATURED_PRODUCTS', 'true', 'Display your featured products in a carousel?<br /><br/>Default = true<br/>', @cid, 101, 'zen_cfg_select_option(array('true', 'false')), ', now()),
(NULL, 'Maximum Display Carousel Featured Products', 'MAX_DISPLAY_SEARCH_RESULTS_CAROUSEL_FEATURED', '10', 'Set this to how many featured products you have - regardless of the number, only three will show on the carousel at a time.<br/><br/>Default = 10<br/>', @cid, 102, NULL, now()),
(NULL, 'Display Description', 'CAROUSEL_FEATURED_DESCRIPTION', 'true', 'Display featured products description?<br/><br/>Default = true<br/>', @cid, 105, 'zen_cfg_select_option(array('true', 'false')), ', now()),
(NULL, 'Description Length', 'CAROUSEL_FEATURED_DESCRIPTION_LENGTH', '100', '--ONLY APPLICABLE IF DISPLAY DISCRIPTION IS TRUE--<br/><br/>Featured product description length in chatacters<br/><br/>Default = 100<br/>', @cid, 106, NULL, now()),
(NULL, 'Display Button', 'CAROUSEL_FEATURED_LINK', 'true', 'Display "Buy Now" or "More Information" buttons?<br/><br/>Default = true<br/>', @cid, 107, 'zen_cfg_select_option(array('true', 'false')), ', now()),
(NULL, 'Display Price', 'CAROUSEL_FEATURED_PRICE', 'true', 'Display featured product price?<br/><br/>Default = true<br/>', @cid, 107, 'zen_cfg_select_option(array('true', 'false')), ', now()),
(NULL, 'Carousel Featured Image Listing Width', 'IMAGE_CAROUSEL_FEATURED_PRODUCTS_LISTING_WIDTH', '100', 'The width of the product images in the carousel.<br/>Default = 100', @cid, 108, NULL, now()),
(NULL, 'Carousel Featured Image Listing Height', 'IMAGE_CAROUSEL_FEATURED_PRODUCTS_LISTING_HEIGHT', '80', 'The height of the product images in the carousel.<br/>Default = 80', @cid, 109, NULL, now());

Register the configuration page for Admin Access Control

INSERT IGNORE INTO admin_pages (page_key,language_key,main_page,page_params,menu_key,display_on_menu,sort_order) VALUES ('configCarouselFeatured','BOX_CONFIGURATION_CAROUSEL','FILENAME_CONFIGURATION',CONCAT('gID=',@cid),'configuration','Y',@cid);*

12 Nov 2012, 6:18 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Major error in SQL process

dturnertms:

It looks like there is a missing bracket in some of the VALUES lines :

'zen_cfg_select_option(array('true','false'), ' should read

'zen_cfg_select_option(array('true','false'))' in

(NULL, 'Carousel Featured Products', 'CAROUSEL_FEATURED_PRODUCTS', 'true', 'Display your featured products in a carousel?<br /><br/>Default = true<br/>', @cid, 101, 'zen_cfg_select_option(array('true', 'false'), ', now())

@dturnertms, no, that's not the problem. The original syntax is correct. The value gets a parenthesis automatically appended to it when the value is pulled from the database at runtime. You can see hundreds of examples of this in the original installation sql code.
Making the changes you suggested will break the plugin's functionality.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

14 Nov 2012, 2:25 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Major error in SQL process

The SQL for that plugin appears to be fine.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.