I’m using MySQL with php. Through a php script i’m trying to import a csv file with the following query
LOAD DATA LOCAL INFILE '$file'
INTO TABLE userstable
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n' IGNORE 1 LINES (name, univ, mobile);
I’m successfully able to import the file in to the database tables but i’m able to see
hidden formatting symbols (as in word, powerpoint, etc..) in all the cells under the last column i.e mobile.
How to avoid those from inserting in the table
Could be DOS line endings.
Try it with
instead.