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?
phpcn_u16587
phpcn_u16587 2018-01-05 02:05:53
0
1
1046

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_u16587
phpcn_u16587

reply all (1)
ringa_lee

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

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!