我有一个可编辑数据库的网站。我正在尝试实现一个简单的系统,以确保没有人同时编辑同一行。我找不到关于如何将PHP变量传递给不同用户或如何将它们全局存储在服务器上的任何信息。
Ex: User 1 is editing Row ABC
User 2 attempts to edit Row ABC
User 2 is warned that someone is editing Row ABC
我心目中最理想的解决办法是
User 1 is editing Row ABC -> Create PHP var for that row to lock it
User 2 attempts