I am trying to import products from an Excel spreadsheet into my website using the OpenCart import tool. I keep getting error message that I have SQL syntax error 1064, telling me to check the manual (that I cannot find in cPanel). I cannot figure out

Avatar
  • Answered
OpenCart version 1.5.4

Original message: 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 '---,---,'3','0','0','1')' at line 1
Error No: 1064
INSERT INTO `danver5_product` (`product_id`,`quantity`,`sku`,`upc`,`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 (801,1000,'','','',5,'801',13,'',1,3,0,NOW(),NOW(),NOW(),0,0,1,9,0,---,---,---,'3','0','0','1'); in /home/danver5/public_html/system/database/mysql.php on line 49
Avatar
Scott
Hello MarciaR, Thank you for your question. The manual mentioned in the error is not a cPanel manual, but the online MySQL manual located at the MySQL website. I agree that it should probably mention that. A 1064 SQL error is a syntax error, which could mean several things. Most often it is either the use of a reserved word or assigning a value of an incorrect type to a field in the database. The latter is true in your case. The three values coming form your excel sheet designated as --- are being assigned to a numeric field in the database. Changing those values to 0 will correct it and the error will disappear. Best Regards, Scott M