Hello,
i run a browser game and sometimes players manage to interrupt a script or there might be an error somewhere... the problem is that some part of the script had already done some changes to the database for example... wich can be very bad if the script does not run untill the end...
For example you want to buy a sword, the script checks for cash, if there is cash it deducts the price of the sword but then there was an error or something and the player did not get that sword.
I want to roll back or not submit those changes unless the script runs to the end. what is the best way to achieve this? i would guess stored procedures but they can only be used with mysql code not php inbetween?
what should i do?