PHPmyAdmin 2.8.0.2 CSV issues

mbrando

Active Member
Dec 31, 2004
38
0
156
Hi,

Is anyone else having trouble with PHPmyAdmin 2.8.0.2 importing CSV data into a table. I have CSV files that import fine using PHPmyAdmin 2.6.4PL2 but not with PHPmyAdmin 2.8.0.2. I get an error that says, "invalid field count on line 65." However the data on line 65 and near 65 looks fine. Again this CSV file imports fine using PHPmyAdmin 2.6.4PL2. My cpanel is version 10.8.2.R83.

Any ideas on wear I can look? Is it possible to roll back to PHPmyAdmin 2.6.4PL2? This came down with one of the updates.

Thanks,
Mike
 

Angel78

Well-Known Member
May 9, 2002
413
1
318
You can insert the data by checking the "CSV using LOAD DATA" as a workaround. :)
 

mbrando

Active Member
Dec 31, 2004
38
0
156
I tried that on my installation and it does not work either. I ended up making an upload script for the client on my own dime since it was a problem with software we provide with our hosting. I'm hoping it gets fixed in an update soon.

Mike
 

Jorge

Well-Known Member
Feb 19, 2003
49
1
158
Did you managed to fix it? I don't have anymore the option to upload csv files?

I get

Format of imported file SQL

SQL options
This format has no options
 

mbrando

Active Member
Dec 31, 2004
38
0
156
Hi

Are you looking at the database import tab or a table import tab? You can only import CSV into a table. No it was never fixed. I ended up spending 4 hours writing upload scripts in PHP for a client with no pay since PHPmyAdmin comes with the hosting I provided as part of a project but does not upload CSV files properly anymore. I'm hoping that it will be corrected in 2.804 but cPanel hs not updated PHPmyADmin as of yet.

Mike
 

24texas

Registered
Feb 19, 2006
2
0
151
I was (still) having the same problem. There is a fix over on the phpmyadmin.net page. Problem is, I don't know how to apply the fix and my host says that until Cpanel updates it anything I do would be overwritten.

Anyone get this resolved?
Thanks,
 

mbrando

Active Member
Dec 31, 2004
38
0
156
Hi,

I'm still waiting too. Cpanel should update soon, I hope. for now, you could try CSV loaddata feature. that might work.

Mike
 

BuffaloWeb

Well-Known Member
Jul 1, 2003
83
0
156
Optionally enclosing fields

I'm also having trouble importing a csv file (created in Excel) into my table using phpMyAdmin version 2.8. In version 2.6, there was a feature to specify that Fields are terminated by "somedelimiter" *on an optional basis*. This "optional" feature is no longer there?!

When saving a csv file, Excel automatically encloses fields with quotes if they contain a comma, semicolon, etc. Therefore some fields will be enclosed by quotes, others will not. Since you have no choice to specify that fields are enclosed by quotes *optionally* anymore, you can no longer import an excel-generated csv file.

Am I missing something here? Is there some other way to import data from Excel to phpMyAdmin?
 

rajanichand

Active Member
Mar 17, 2004
38
0
156
India
PhpMyAdmin import

Ya, we are also having the same issue. Couldn't find a fix for this so far. Any ideas :confused:
 

BuffaloWeb

Well-Known Member
Jul 1, 2003
83
0
156
Finally worked for me - correct options to use:

Use "CSV using LOAD DATA"
Fields terminated by ,
Fields enclosed by "
Fields escaped by \ (default)
Lines terminated by ; (or auto)
Use LOCAL keyword checked

The 'enclosed by " ' automatically uses 'optionally' logic - you just don't see it
 

rajanichand

Active Member
Mar 17, 2004
38
0
156
India
Thx

Thanks! That worked.
:cool: :) :D
 

24texas

Registered
Feb 19, 2006
2
0
151
Tried it that way and every other combination I could think of. Never go it to work.
I use an Access database to export the csv file. I'm almost sure I used options to match the import.