I want to stop user to make two call at same time. Because if there is two call at same time it create bug in my application and update wrong info. I want it to finish first activity of user and give a error if user try to make two call at same time.
I am recording all user activity in table ->
table feed ->
......................................................
id ! user ! value ! start ! finished ! timestamp
......................................................
7 ! 22 ! 100000 ! ok ! ok ! --------
......................................................
6 ! 22 ! 251632 ! ok ! ok ! --------
......................................................
5 ! 53 ! 125469 ! ok ! ok ! --------
......................................................
4 ! 20 ! 458962 ! ok ! ok ! --------
......................................................
3 ! 19 ! 124587 ! ok ! ok ! --------
......................................................
2 ! 17 ! 321457 ! ok ! ok ! --------
......................................................
I am recording data this way.
- When user activity start it update : user, value and start as ok
- when user finished activity it update : finished as ok
Now i am very confused how to check and stop two request at same time of a same user.
I am using php and mysql
thanks