Page 1 of 1

PHP/MYSQL - update table (not update record, but add new...

Posted: Tue Apr 01, 2008 11:21 pm
by bhonan
Having trouble searching for a way to update a mysql table. There are over 1000 records and each day some are added and some are deleted on another server. All I received is an updated CSV daily. I can delete all the records and add in all new ones, but that seems unnecessary... where can I find some info on how to update a table?

Re: PHP/MYSQL - update table (not update record, but add new...

Posted: Wed Apr 02, 2008 12:47 am
by Christopher
It is probably fastest and easiest to delete all rows and then import everything. DELETE and TRUNCATE are very fast, and LOAD DATA INFILE is likewise fast. Otherwise you will be doing a lot of work and it will probably be slower.