I am developing a simple support application where clients ask questions and admins answer them. I need to implement a resource lock for a question to avoid multiple admins working on same question and avoid data collision. What are best practices for this kind of task?
PS I am using PHP and MySQL base to store questions.
Edit
I know that i just simply could put a state field to that resource and when opened ill lock it but how do i close it if lets say admin just closes the browser window.
Well … if you have your questions in Mysql db how to just add one column with info who is working on this problem? You could then check it when admin wants to open question…