search

Home  >  Q&A  >  body text

In a multi-user environment, how does tp5 verify whether the data has been modified by others before it is submitted and saved? Is there any built-in verification method?

In a multi-user environment, multiple users view and modify the same data. How to verify that the data has not been modified by other users before the user submits and saves it. I want to add a timestamp field to the database table design for saving. The time when the data was modified, then this timestamp is passed to the front-end form when the user views the modification, and this timestamp is submitted when the user submits and saves, and then this timestamp is compared with the timestamp recorded in the database when the data is saved. See if changes have occurred to determine whether the data has been modified by others. I would like to ask here, is there a built-in verification method in tp5 to verify this situation? Or you just have to write the verification method yourself.

phpcn_u16587phpcn_u165872544 days ago1110

reply all(1)I'll reply

  • ringa_lee

    ringa_lee2018-01-06 20:14:25

    Just check the data table and compare the checked data with the current data. It is not complicated. It is not troublesome to handle it manually

    reply
    0
  • Cancelreply