Effective management of data changes

后端 未结 5 1100
滥情空心
滥情空心 2021-02-13 18:05

I have a table called Bookings. This table contains data representing a booking made for a particular service, with many variables.

A while ago I came across a problem w

5条回答
  •  孤独总比滥情好
    2021-02-13 18:46

    What if you used a backup table to store data from the original table before modifying the original table? you could then use a rollback function to restore data to a previous state.

    Here is a flowchart of my database update process theroy: http://i1371.photobucket.com/albums/ag300/joshua127/BookingFlowchartinsert_zps5c2d55f8.png

    Here is a flowchart of my selection process theroy: http://i1371.photobucket.com/albums/ag300/joshua127/BookingFlowchartselect_zps702fa902.png

    Hope this helps, just another way to look at it.

    P.S. To keep the financial information unchanged, you could write your update functions to count the number of columns to be updated (based on your update array of column names) and provide variables to hold specific values for those columns alone. you could reference the array indexes ($array['index']) in the SQL statement to make it dynamic.

提交回复
热议问题