I've got a problem. I have my own browser game, and there is something like
SELECT * FROM attack WHERE proc = 0 AND endtime < $current_time
it works, but problem is that when there are more than 10 users online, there is big chance that 2 users click at same time = attack is proccessing twice. However, I do not want to increase query count to have "column" for example "locked". Does anybody know solution ?