Post by creativient » Tue Jul 16, 2019 1:24 pm

anyone could help me how to resolve the error below? I'm using the import/export to upload multiple products.

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 ''',1,0.00,0,NOW(),NOW(),NOW(),0,1,0,0,0,0,0,0,'1','0','1','1')' at line 1
Error No: 1064
INSERT INTO `ocbm_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 (17,1,'','','','','','','',0,'MOD-17',,'',1,0.00,0,NOW(),NOW(),NOW(),0,1,0,0,0,0,0,0,'1','0','1','1');

Newbie

Posts

Joined
Thu Aug 02, 2018 8:16 pm

Post by letxobnav » Tue Jul 16, 2019 2:51 pm

the value of manufacturer_id is not defined.

Crystal Light Centrum Taiwan
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


Active Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by cedcommerceteam » Tue Jul 16, 2019 2:51 pm

Hi there,

This is a SQL syntax error for ', please write (int) for integer values and $this->db->escape() for string values.
For Example :

Code: Select all

$this->db->query("INSERT INTO `". DB_PREFIX ."table` SET `product_id` = '". (int) $product_id ."', `name` = '". $this->db->escape($name) ."' ");
Check for extra apostrophes.

Please try storing data by above way, if you have any queries do write us here.

https://cedcommerce.com/opencart-servic ... edium=post

Thanks & Regards :

Call us at : (+91) -8765210318 , Skype: live:carlmorgan.cedcommerce , Email: support@cedcommerce.com
CedCommerece : Officail Opencart Partners
CedCommerce Official : www.cedcommerce.com
Opencart Services : www.cedcommerce/opencart-services.com
Sell On various Marketplace Integration : Opencart-Extensions
Magenative Mobile App/IOS Development : magenative.com


User avatar
Active Member

Posts

Joined
Wed Aug 09, 2017 9:02 pm
Who is online

Users browsing this forum: No registered users and 8 guests