How to stop same user by making two call at same time
<p>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.</p>

<p>I am recording all user activity in table -></p>

<p>table <strong>feed</strong> -></p>

<pre><code>......................................................
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     ! -------- 
......................................................
</code></pre>

<p>I am recording data this way. </p>

<ul>
<li>When user activity start it update : <strong>user, value and start</strong> as <strong>ok</strong></li>
<li>when user finished activity it update : <strong>finished</strong> as <strong>ok</strong></li>
</ul>

<p>Now i am very confused how to check and stop two request at same time of a  same user.</p>

<p>I am using php and mysql </p>

<p>thanks</p>
