Post by TAC » Thu Dec 02, 2010 10:34 pm

Hi all,
I have tried to find a solution to this in the forums, and there are a lot of posts with "You have an error in your SQL syntax etc." in them, but I cannot find one that helps in my case.

The full error message is-
Error: 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 ')' at line 5
Error No: 1064
INSERT INTO `product_to_category` (`product_id`,`category_id`) VALUES (74,48), (74,41), (74,42), (74,);

I get this message during uploading of the spreadsheet in the Export/Import tool.
From what I have read I believe it means there is something wrong with the code and there is an extra ) where it shouldn't be but I do not know how to fix this. I have looked in various files & folders but with no luck.

If anyone can point me in the right direction I will be most grateful. :)

I've only go this and a couple of other things to iron out and I will be able to go live with my first ever OC website :yahoo:

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by JAY6390 » Thu Dec 02, 2010 10:41 pm

Sounds like you have an extra , in the category_id field of whatever your product 74 is in the PRODUCT tab - check the spreadsheet

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by TAC » Thu Dec 02, 2010 11:23 pm

Thank you JAY6390!
I did have an extra comma there.
It uploaded fine after that but nothing shows up in the store. Another mystery to solve....
:(

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by JAY6390 » Thu Dec 02, 2010 11:32 pm

Did you give the correct store id's etc to the product?

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by TAC » Sat Dec 04, 2010 7:48 pm

I have a few little things wrong that I am fixing one by one. :)

The thread here is very useful for those of us still learning the basics:
http://forum.opencart.com/viewtopic.php ... ds#p110819

I'd also named a folder in my Images folder as 'Products' but in the spreadsheet I had put "data/products/...." so I changed the folder name to 'products' and the images started to show up. Silly mistake but not so obvious when you are desperate to get the store working and probably rushing things a bit :laugh:

Thank you for your valued help once again!

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England
Who is online

Users browsing this forum: No registered users and 1 guest