Import CSV into MySQL - With Fields Already Established
This may be a dumb question, but I can't seem to find an answer on google or programmatically create one. I have a huge CSV file called contacts2.csv (comma separated) that I want to import into my MySQL db. Now the tricky part is that I already have a bunch of fields in the DB that i want to place the data into, but they don't match up to the CSV.

For example, The first column may be "Company" on the CSV, but its actually the 5th column on MySQL. I also have a auto increment "id" column that is currently at 129483653 that I'd like to keep auto-incrementing as these are imported.

I found a few scripts online to show the data and to import into a new table, but I need to add all of these records into my existing table without overwriting anything.


Thank you

UPDATE: I think I may need to have someone help me write something custom in order to do all of this. I have tried:

http://www.codewalkers.com/c/a/Database-Code/PHP-CSV-Importer-20/

http://www.geeklog.net/forum/viewtopic.php?showtopic=71161

Among other sources.
Import CSV into MySQL - With Fields Already Established
===

This may be a dumb question, but I can't seem to find an answer on google or programmatically create one. I have a huge CSV file called contacts2.csv (comma separated) that I want to import into my MySQL db. Now the tricky part is that I already have a bunch of fields in the DB that i want to place the data into, but they don't match up to the CSV.

For example, The first column may be "Company" on the CSV, but its actually the 5th column on MySQL. I also have a auto increment "id" column that is currently at 129483653 that I'd like to keep auto-incrementing as these are imported.

I found a few scripts online to show the data and to import into a new table, but I need to add all of these records into my existing table without overwriting anything.


Thank you

UPDATE: I think I may need to have someone help me write something custom in order to do all of this. I have tried:

http://www.codewalkers.com/c/a/Database-Code/PHP-CSV-Importer-20/

http://www.geeklog.net/forum/viewtopic.php?showtopic=71161

Among other sources.