简体   繁体   中英

How to modify CSV file prior to import into mySQL to allow for commas in data

I am hoping there is a fix that does not involved adding PHP code or modifying mySQL. I need to import a CSV file . Whenever there is a comma in one of the names (ex: ABC Company, Inc.) it does not import the row. Beside this the import function works great.

I tried to modify the CSV file prior to import by surrounding the comma with "" as well as the name "ABC Company, Inc." but nothing works.

Any suggestions?

Thank you.

Create the csv with Quoted Identifiers. Otherwise there is no way to tell a comma delimiter from a comma in a text field.

Either that or pick a delimiter that is not in any of the fields such as a "|" character or tab.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM