Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 csv import error incorrect string value
Author « Topic »  

tgorski
Ecommerce Template Expert

USA
910 Posts

Posted - 11/02/2017 :  14:30:06  
Can anyone tell me how to clean up this csv import that is generating an incorrect string value on the pLongDescription field? Maybe correcting the character set?

Here's a sample of the error output:
Adding row: Incorrect string value: '\x94 h x ...' for column 'pLongdescription' at row 1Line 1,
1366Incorrect string value: '\x94 (9" ...' for column 'pDescription' at row 1Line 2,
1366Incorrect string value: '\x94 (9" ...' for column 'pDescription' at row 1Line 3,
1366Incorrect string value: '\x94 (9" ...' for column 'pDescription' at row 1Line 4,
1366Incorrect string value: '\x94 T X ...' for column 'pDescription' at row 1Line 5,
1366Duplicate entry 'AK-8661' for key 'PRIMARY'Line 6, (This error is clear ;-)
1062Incorrect string value: '\x94 x 6....' for column 'pDescription' at row 1Line 7,
1366Incorrect string value: '\x94 x 9....' for column 'pDescription' at row 1Line 8,
1366Incorrect string value: '\x94 x 12...' for column 'pDescription' at row 1Line 9,
1366Incorrect string value: '\x94 x 13...' for column 'pDescription' at row 1Line 10,

Thanks!

Tim Gorski

Sinbad
ECT Moderator

USA
65937 Posts

Posted - 11/02/2017 :  14:41:52  
Hi Tim, I don't think its a character set issue but more of a content issue have you tried removing the special characters like slashes for the description.

Winners never quit, quitters never win
CSS and Responsive Designs
User Manual for Ecommerce Templates

tgorski
Ecommerce Template Expert

USA
910 Posts

Posted - 11/02/2017 :  14:47:44  
I know the pName and pID fields don't take special characters, but I didn't know that applied to descriptions as well.

Upon inspecting the data, there is a " in each description such as 8” h x 5”w x 4.25” or (1-oz. shot glass with metal Swiss shield and “Switzerland”.)

So do I take those out or replace them with ASCII characters or what?


Tim Gorski

Sinbad
ECT Moderator

USA
65937 Posts

Posted - 11/02/2017 :  17:51:14  
Hi quotes and parenthesis should be ok, can you try testing with just one item in the csv file without those.

Winners never quit, quitters never win
CSS and Responsive Designs
User Manual for Ecommerce Templates

tgorski
Ecommerce Template Expert

USA
910 Posts

Posted - 11/03/2017 :  08:20:40  
I'm down to JUST the description fields, having replaced all " with the word inches, but I get the following 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 'FROM products WHERE pID='abcwxyz'' at line 1
ERROR:
Column list is: "pid,pdescription,plongdescription,"
Rows successfully updated 0
This page took: 0.0009 seconds

Tim Gorski

Andy
ECT Moderator

95440 Posts

Posted - 11/03/2017 :  09:15:49  
Can you make sure the columns list is like this

pID,pDescription,pLongDescription

with no comma at the end.

Andy

Please feel free to review / rate our software

tgorski
Ecommerce Template Expert

USA
910 Posts

Posted - 11/04/2017 :  07:26:20  
FYI ... I'm getting the same error when uploading images:

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 'FROM products WHERE pID='abcwxyz'' at line 1
ERROR:
Column list is: "imageproduct,imagesrc,imagetype,imagenumber,"

Tim Gorski

tgorski
Ecommerce Template Expert

USA
910 Posts

Posted - 11/04/2017 :  07:38:01  
Both are setup using the properly capitalized default field names ... I always create imports using downloaded inventory or image reports as a starting point.

Tim Gorski

Andy
ECT Moderator

95440 Posts

Posted - 11/04/2017 :  07:47:26  
Can you remove the comma at the end?

Andy

Please feel free to review / rate our software

tgorski
Ecommerce Template Expert

USA
910 Posts

Posted - 11/04/2017 :  12:35:13  
You're BOTH right ... special characters in the Description caused part of the description to be pushed to the next column, which of course had no field name.

Sorry to be a bother ;-)

Tim Gorski
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.02 seconds. Snitz Forums 2000