Post by khalidmahomed » Mon Jun 19, 2017 11:20 am

Hi All,
Hope someone will be able to help here as i'm stuck!!

I am trying to import products to my opencart store but get the following error:
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 ''2VV',30,'Catalog/Fifth Avenue 125ml EDP Spray.jpg',1,20,0,NOW(),NOW(),'2017-06-' 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 (122,1000,'','','','','','','',,'2VV',30,'Catalog/Fifth Avenue 125ml EDP Spray.jpg',1,20,0,NOW(),NOW(),'2017-06-15',0,1,1,0,0,0,0,0,'1','1','1','1');

My Error logs states:
PHP Exception: 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 ''2VV',30,'Catalog/Fifth Avenue 125ml EDP Spray.jpg',1,20,0,NOW(),NOW(),'2017-06-' 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 (122,1000,'','','','','','','',,'2VV',30,'Catalog/Fifth Avenue 125ml EDP Spray.jpg',1,20,0,NOW(),NOW(),'2017-06-15',0,1,1,0,0,0,0,0,'1','1','1','1'); in /home/#####//system/library/db/mysqli.php on line 40

I can attach the file if necessary.

Newbie

Posts

Joined
Tue Jan 08, 2013 9:32 am

Post by pprmkr » Mon Jun 19, 2017 1:31 pm

Code: Select all

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 (122,1000,'','','','','','','',,'2VV',30,'Catalog/Fifth Avenue 125ml EDP Spray.jpg',1,20,0,NOW(),NOW(),'2017-06-15',0,1,1,0,0,0,0,0,'1','1','1','1');
Tenth column '`stock_status_id`' has no value. Has to be '0' or '';

Code: Select all

VALUES (122,1000,'','','','','','','',,'2VV',
Notice ,, before '2VV' !

User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by khalidmahomed » Mon Jun 19, 2017 7:16 pm

pprmkr wrote:
Mon Jun 19, 2017 1:31 pm

Code: Select all

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 (122,1000,'','','','','','','',,'2VV',30,'Catalog/Fifth Avenue 125ml EDP Spray.jpg',1,20,0,NOW(),NOW(),'2017-06-15',0,1,1,0,0,0,0,0,'1','1','1','1');
Tenth column '`stock_status_id`' has no value. Has to be '0' or '';

Code: Select all

VALUES (122,1000,'','','','','','','',,'2VV',
Notice ,, before '2VV' !
Hi,

Thats done it! Thank you so much! I didnt know what those fields meant so couldnt work out where i was going wrong...

Thanks pprmkr

Newbie

Posts

Joined
Tue Jan 08, 2013 9:32 am
Who is online

Users browsing this forum: No registered users and 27 guests