Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to add SQL to Database with phpMyAdmin


omidhz

Recommended Posts

Posted

Hi, I'm trying to load a sql into my Database, but I'm getting 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 'WHERE LIKE '16'' at line 1

 

My first line of the sql is as follows:

 

INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES ('16', 'Website Maintenance', 'Website Maintenance Options', '16', '1');

 

The last row on that table is 16.

 

Should I change the '16' to '17' and '16','1' to '17','1' Or not?[/font]

Regards,

Posted
Hi, I'm trying to load a sql into my Database, but I'm getting the following error:

 

#1064 - You have an errrr in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE LIKE '16'' at line 1

 

My first line of the sql is as follows:

 

INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES ('16', 'Website Maintenance', 'Website Maintenance Options', '16', '1');

 

The last row on that table is 16.

 

Should I change the '16' to '17' and '16','1' to '17','1' Or not?[/font]

 

thats not the query causing the error, there is no 'Where' clause on it. and Insert statement do not have where clauses

Posted
thats not the query causing the error, there is no 'Where' clause on it.

Thanks for your reply,

I don't know how to fix this problem.

I'm trying to add the sql with the "Down For Maint v2.1 for MS2" contribution.

Here is the link to that contribution: Down for Maintenance

 

I'm using the English version.

Can you help me to fix this problem ?

 

 

Thanks

Regards,

Posted
could it be possible that configuration_group_id is an auto-incrementing ID?

 

Just checked, yes it is auto-increment

 

change the query to

 

INSERT INTO configuration_group (configuration_group_title, configuration_group_description, sort_order, visible) VALUES ('Website Maintenance', 'Website Maintenance Options', '16', '1');

Posted
Just checked, yes it is auto-increment

 

change the query to

 

INSERT INTO configuration_group (configuration_group_title, configuration_group_description, sort_order, visible) VALUES ('Website Maintenance', 'Website Maintenance Options', '16', '1');

Great,

it is working now.

Thank you

Regards,

Archived

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

×
×
  • Create New...