Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

having trouble uploading SQL files


Tsimi

Recommended Posts

recently i tried to install various add-ons that require alternations to the database.

these add-ons include SQL files which i then try to upload through phpMyadmin selecting the

"Import" tab, "browse for the file" click "go" and then i get this.

 

SQL query:

 

[...]

 

MySQL said: Documentation

#1062 - Duplicate entry '0' for key 'PRIMARY'

 

taking a look at the SQL file

 

example:

 

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_orTher, last_modified, date_added, use_function, set_function) VALUES

('', 'Invoice Print Shop Logo on Invoice', 'PDF_INV_SHOW_LOGO', 'true', 'Should the Sop Logo be printed on the Invoice ? False = No, True = Yes', 7200, 1, NULL, now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'), ') ,

('', 'Invoice location of the shop logo', 'PDF_INV_STORE_LOGO', 'images/oscommerce.jpeg','Give the location of the ShopeLogo', 7200, 2, NULL, now(), NULL, NULL),

('', 'Invoice Print Addres Webshop ', 'PDF_INV_SHOW_ADRESSSHOP', 'true', 'Print the Addres etc on The Invoice ? False = No, True = Yes', 7200, 3, NULL, now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'), ') ,

 

i'm a noob regarding mySQL but from what i understand there seems to be a problem with creating/generating the configuration_id. i encountered this problem before and that time i just removed configuration_id and the the '', at the beginning and and it worked.

 

i would like to know why that is happening? is the SQL file made for older versions of mySQL?

or is it a mistake from my side?

Link to comment
Share on other sites

@@multimixer

 

hi george

 

thank you for your answer.

 

yes, there is this option just above the "go" button inside the "import" area and it is/was always checked.

i unchecked it and tried it again and it worked. now i don't have to delete configuration_id and '', inside the SQL files anymore.

thank you!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...