SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    if ($zee == "Guru") { $zee--;}
    Join Date
    Nov 2005
    Location
    Karachi - Pakistan
    Posts
    1,134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Store previous updates to a workorder

    Hi

    I have a system where multiple users work. They CRUD Work Order which is a Master and Multiple Childs sort of form.

    Now, we need to have a way to retrieve previous versions of a Work Order. So that whenever some one update any of the MASTER or CHILDs column/row, it first copy the EXISTING data to a update history table and then update the live DB.

    At the moment - we are just populating an HTML template with the data and storing the whole HTML in the DB for earlier versions. But I want a better way to do this as in case we update our template etc, the earlier versions of the workword will remain in the old html in the database.

    What is the best way to do this ? Please guide !

    Regards
    ZH

  2. #2
    SitePoint Enthusiast
    Join Date
    Jul 2012
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could make it so that instead of editing the existing data, you can create new data with the date and time that it was created. That way each change is logged and you know when it was made. You could also have an auto-incrementing revision number to tell you which revision it is. You could even add a 'changed by who' to track who changed what when.


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
  •