>Hi all, I have a csv file that i need to import into my sql database. The csv
>file itself contains extra commas, that is screwing the whole app up since
>mysql reads the comma as a field separator. I have tried using a different
>field separator and also other methods such as implode/explode/str_replace
>but it doesnt seem to work. Can anybody help me? Thanks!!
Looks like the CSV-file is not properly formatted. If some fields also
contain commas, they have to be quoted, e.g.
These are just three fields, not four. And IMHO MySQL will handle this
correctly. Also have a look at the various options for a LOAD DATA
statement. If it still doesn't work, please post a short excerpt from
the CSV and the query you're using for the import.