Results 1 to 2 of 2

Thread: Update database

  1. #1
    Join Date
    Aug 2005
    Posts
    174
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Update database

    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

  2. #2
    Join Date
    Mar 2008
    Posts
    218
    Thanks
    7
    Thanked 19 Times in 19 Posts

    Default

    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?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •