Hello,
I am developing a restore/ update tables in a mysql database using data uploaded from a comma delimited format.
My question arises when i get errors pertaining to inserting the data back into mysql using mysql_query() because of "line breaks" in the data. i have tried converting these line breaks into their ascii character but i still get the error for it.
Can you guys recommend a method in dealing with a situation such as this?
Kendall
P.S. do you knwo of any snippet code librarys that allow me to parse the csv files based on its csv options i.e. fields terminated by, fields enclosed in, lines terminated by....etc
mport csv files to Mysql with \r\n data
Moderator: General Moderators
- kendall
- Forum Regular
- Posts: 852
- Joined: Tue Jul 30, 2002 10:21 am
- Location: Trinidad, West Indies
- Contact:
import csv files to Mysql with \r\n data
infolock,
I was trying that but it is so hard to determine wether the new line is part of the data or an actual new row
Kendall
I was trying that but it is so hard to determine wether the new line is part of the data or an actual new row
Kendall
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
this thread may be of interest.