phpadmin adding columns to csv files on import

I have a site @hosting24.  The client wants it setup on dreamhosting.
I exported the tables from "hosting24" as csv files.  

I now have to use phpmyadmin to import the files.  When I do, I'm getting an error that there are duplicate column names.  It's adding two fields called "NULL" at the end of the header row.  I've looked at the "csv" files and they are correct.

Any ideas.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
Create the table with the correct fields and then do the import.  If necessary, tell phpMyAdmin to skip the first row.  You also may need to tell phpMyAdmin which fields you are importing into.  It will take the data in order and put it into those fields in the table.  I do that to skip over 'id'/autoincrement fields.
Ray PaseurCommented:
two fields called "NULL" at the end of the header row
Just guessing but this may be due to line endings like CR/LF.  You may want to trim() the lines before using them in the import.
Dave BaldwinFixer of ProblemsCommented:
I've never had a problem with phpMyAdmin and line endings.  I have uploaded 'standard' CSV files from Windows to phpMyAdmin on Linux fairly often over the past few years.  And on Windows too.  Never had to do anything about the line endings to make it work.
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Ray PaseurCommented:
Might be helpful to see the data in the CSV files.
Dave BaldwinFixer of ProblemsCommented:
I believe it would.
breeze351Author Commented:
I exported the files from hosting as sql and then imported to dreamhosting and it did work.  I can import the csv files into Access, Excel and OpenOffice.  What is the diff between using "phpmyadmin" at dreamhost and "CPanel" at hosting24.  

I have no problems with "CPanel".  They are the same files.

I'm starting to think that it's the customers "consultant" wants us to fail.  He tells me to modify the php.ini but I don't have access to it.   Some of the files will not load because of the size limitations.  I have the same site and database on "hosting24"!

This is a "cluster f#ck"

I've attached a csv file that would not work.  I'm also attaching some screen prints of the problems with the uploads to "dreamhost".

Dave BaldwinFixer of ProblemsCommented:
Several of the errors are because PHP is running out of memory.  'mapfile.csv' is probably going to be one also.  Some of the others are probably bad definitions because NULL and DELETE are reserved words in MySQL and should not be used as column names.  I suspect if you check the tables that supposedly worked that the column names may not be correct.

I have always had to create the tables first for CSV uploads.  phpMyAdmin that I have used will not automatically do that.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
breeze351Author Commented:
I'm not going to use Dreamhost.  They say that the will not help with PHP errors, and the customers consultant tells me that he does not know anything about PHP or databases!!  I set up a sub at hosting24 and haven't have any problems.
Dave BaldwinFixer of ProblemsCommented:
Most web hosts will Not help with programming problems and errors.  Setting it up at hosting24 is probably a good choice.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.