So I'm having a problem with a field in the MySQL database: it's a bank account field called "bank" part of the "user" table. Every user has his own row with his bank savings. The problem is when 2 users share the same account in the bank (they can deposit or withdraw from the same raw in the database) ... if they press the "withdraw" button at the same time and they both get all the money from the bank and they basically double their money (this is an exploit actually).
A lot of users did this and ended up with a lot of money. Is there a protection I can apply for this?
I was thinkin' on locking that row but it also may happen one user to deposit and the other to withdraw at the same time ... so sometimes that could affect a normal player ...
I'm willing to pay someone for a good solution to my problem. Feel free to bid.