in reply to Updating fields in a mysql database

So, if I understand, the data in the CSV file is correct? Why don't you just delete all the data in the MySQL table, then read in the CSV file? MySQL can load data from CSV files.

Otherwise (for instance if the CSV doesn't contain all users), use the DBI. It has drivers for both MySQL and CSV. Read from the CSV file, and for each record, do a delete/insert on the MySQL site.

Abigail

  • Comment on Re: Updating fields in a mysql database