MRC
MRC

Reputation: 553

MySQL importing CSV file with phpmyadmin without cell quotes

I have a huge CSV file with the data like this:

ID~Name~Location~Price~Rating 
02~Foxtrot~Scotland~~9
08~Alpha~Iceland~9.90~4
32~ForestLane~Germany~14.35~

The issue is that when importing using PHPMyAdmin, it asks for Columns enclosed with: and Columns escaped with:. The trouble is, that this CSV doesn't have quotes for the cells.

If I leave this blank, it gives the error: Invalid parameter for CSV import: Columns escaped with

Is there a way to import without having quotes on the CSV?

Upvotes: 1

Views: 1861

Answers (1)

Isaac Bennetch
Isaac Bennetch

Reputation: 12462

I can reproduce this behavior. I'll bring it up on the phpMyAdmin development discussion list, but in the meantime, you can can work around it by using some nonsense character for "Columns escaped with" and leaving "Columns enclosed with" blank. Make sure your data doesn't contain, say a " or £ and use that for "Columns escaped with". For instance, I have a data set where I know £ doesn't exist, so I can use that for the "Columns escaped with" character -- if you don't have any escaped characters, you can enter any character there.

I'll update if I can provide any more useful information, but certainly that workaround should allow you to import your data.

Upvotes: 1

Related Questions