Post by deshoon1 » Thu Jun 13, 2013 12:52 am

HI ALL
I'm running 1.5.5.1 v of open cart and I am now trying to import products back into my store. The export works fine but when I edit the file to add new products into it and go to import it back into opencart I receive this particular error..

Notice: 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 ''','660726501214','','','','','',5,'CSPTMSLT0012CHOCBR',24,'',1,17.99,0,NOW(),NO' at line 1
Error No: 1064
INSERT INTO `oc_product` (`product_id`,`quantity`,`sku`,`upc`,`ean`,`jan`,`isbn`,`mpn`,`location`,`stock_status_id`,`model`,`manufacturer_id`,`image`,`shipping`,`price`,`points`,`date_added`,`date_modified`,`date_available`,`weight`,`weight_class_id`,`status`,`tax_class_id`,`viewed`,`length`,`width`,`height`,`length_class_id`,`sort_order`,`subtract`,`minimum`) VALUES (197,,'','660726501214','','','','','',5,'CSPTMSLT0012CHOCBR',24,'',1,17.99,0,NOW(),NOW(),NOW(),0,0,0,9,0,0,0,0,'0','0','1','1'); in /home/content/19/7752319/html/p******/system/database/mysql.php on line 50

not sure if this could be part of the issue but for the product_id instead of numbering down each row I used a formula because it was so many to number individually? I also tried doing what the error said and no luck.. any help would be so great and much appreciated.

User avatar
New member

Posts

Joined
Wed Mar 13, 2013 9:40 am

Post by JNeuhoff » Thu Jun 13, 2013 3:32 am

You havn't pasted the complete error message, so it's hard to help you. Possibly an issue with missing quantity.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by deshoon1 » Thu Jun 13, 2013 5:27 am

this is the complete error that appears in the web browser:

Notice: 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 ''','660726501214','','','','','',5,'CSPTMSLT0012CHOCBR',24,'',1,17.99,0,NOW(),NO' at line 1
Error No: 1064
INSERT INTO `oc_product` (`product_id`,`quantity`,`sku`,`upc`,`ean`,`jan`,`isbn`,`mpn`,`location`,`stock_status_id`,`model`,`manufacturer_id`,`image`,`shipping`,`price`,`points`,`date_added`,`date_modified`,`date_available`,`weight`,`weight_class_id`,`status`,`tax_class_id`,`viewed`,`length`,`width`,`height`,`length_class_id`,`sort_order`,`subtract`,`minimum`) VALUES (197,,'','660726501214','','','','','',5,'CSPTMSLT0012CHOCBR',24,'',1,17.99,0,NOW(),NOW(),NOW(),0,0,0,9,0,0,0,0,'0','0','1','1'); in /home/content/19/7752319/html/projefitco/system/database/mysql.php on line 50

this is the error from my error log in open cart:
2013-06-12 14:23:50 - PHP Notice: 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 ''','660726501214','','','','','',5,'CSPTMSLT0012CHOCBR',24,'',1,17.99,0,NOW(),NO' at line 1<br />Error No: 1064<br />INSERT INTO `oc_product` (`product_id`,`quantity`,`sku`,`upc`,`ean`,`jan`,`isbn`,`mpn`,`location`,`stock_status_id`,`model`,`manufacturer_id`,`image`,`shipping`,`price`,`points`,`date_added`,`date_modified`,`date_available`,`weight`,`weight_class_id`,`status`,`tax_class_id`,`viewed`,`length`,`width`,`height`,`length_class_id`,`sort_order`,`subtract`,`minimum`) VALUES (197,,'','660726501214','','','','','',5,'CSPTMSLT0012CHOCBR',24,'',1,17.99,0,NOW(),NOW(),NOW(),0,0,0,9,0,0,0,0,'0','0','1','1'); in /home/content/19/7752319/html/projefitco/system/database/mysql.php on line 50

which are one in the same... I will include quantities and see if this works.

User avatar
New member

Posts

Joined
Wed Mar 13, 2013 9:40 am

Post by deshoon1 » Thu Jun 13, 2013 6:32 am

Hi all,

I did miss the quantity on one of my products so thanks for pointing that out.. However, the real problem was that I used a formula to number the product id in the product_id column(i tried to upload after i fixed the quantity issue and it didn't work)..I suppose no formulas can be used also it is good to double check to make sure you have not missed a field as I did providing the number of products available in the "quantity" field. I went through and just numbered all of the products took about an hour since I had so many and went to upload and it works perfectly!
Thanks a lot for the input because I would have never thought to check the quantity.
*sorry also just realized that when I copy and paste the error is cut off when giving the fields manufacturer, date and time, etc.*

User avatar
New member

Posts

Joined
Wed Mar 13, 2013 9:40 am
Who is online

Users browsing this forum: No registered users and 5 guests