Log in

View Full Version : Update database



nikomou
05-12-2008, 12:01 AM
Hey,

I have a customer database (mySQL), every time i update the database with the current data, I have a script to delete all the old data, then import the new data.. This is all great except if an old customer is not in the new database, then the record is deleted.

I want to be able to just update the records which have either changed or are not already there..

I'm uploading from a csv using LOAD DATA LOCAL INFILE

Thanks for your help

tfit
05-17-2008, 07:55 PM
nikomou,

I suggest you add another field to your table add store a timestamp in there. Create another table and join them together. I know it's a kludge, but I guess your table isn't normalized. Delete/update anomolie?