I’ve made a theater tickets booking website (user-> book and pay / admin->manage sells from a webinterface).
I use a table in mysql database to handle tickets: each column is a specific day and each line of this day is a boolean to know which seat is booked (1 for booked, 0 for free).
But i wanted to improve this system and have a third state for when the user is currently booking online and has not paid (finalized the order) yet to prevent the other users to book his seats.
So, is there a way to save this third state (-1 for example) for a limited time only (about 15min) in the tickets table ?
thank you in advance
Use
onInsert/onUpdatetrigger withSLEEP(<seconds>).Updated:
Pay attention that triggers can be set from root only.