Forums / General Questions / Error when opening Attribute Controller

Error when opening Attribute Controller

Results 1 to 2 of 2
24 Jun 2014, 06:55
#1
kerrydunk avatar

kerrydunk

New Zenner

Join Date:
Feb 2012
Posts:
13
Plugin Contributions:
0

Error when opening Attribute Controller

Apologies if this is in the wrong section.

I am getting an error when trying to click on the Attribute Controller.
I get the following error:

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'int)PRODUCTS_OPTIONS_VALUES_TEXT_ID, 1, 'TEXT')' at line 1
in:
[INSERT INTO products_options_values (products_options_values_id, language_id, products_options_values_name) VALUES ((int)PRODUCTS_OPTIONS_VALUES_TEXT_ID, 1, 'TEXT')]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

Can someone please let me know how I can fix this?

Thanks
Kerry
24 Jun 2014, 07:49
#2
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Posts:
6,263
Plugin Contributions:
3

Re: Error when opening Attribute Controller

kerrydunk:


I am getting an error when trying to click on the Attribute Controller.
I get the following error:

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'int)PRODUCTS_OPTIONS_VALUES_TEXT_ID, 1, 'TEXT')' at line 1


This looks like you are missing a Database record. If you are lucky, the problem will 'fix itself' by simply navigating your way to catalog->option_value_manager.

From the zencart code I see........
// check for damaged database, caused by users indiscriminately deleting table data

Followed by this code, which looks like it fixes the missing data.

$db->Execute("INSERT INTO " . TABLE_PRODUCTS_OPTIONS_VALUES . " (products_options_values_id, language_id, products_options_values_name) VALUES (" . (int)PRODUCTS_OPTIONS_VALUES_TEXT_ID . ", " . (int)$languages[$i]['id'] . ", 'TEXT')");

I could be way off the mark here though.

Cheers
RodG