1
I have the following problem:
I am creating a booking application and as soon as a user clicks on a product to book, this product should be removed from the list of available temporarily for him to finalize the reservation. If it does not finish in 5 minutes, this product is available again.
I managed to make this previous reservation by updating the 'status' column of the product, but I have no idea how to make it back to availability after 5 minutes.
Can someone help me?
You can use a Cron to re-update all items that have been booked and not confirmed in the last 5 minutes and return them to available status. Include your code to the question.
– Leandro Angelo
I would use a scheduled event in mysql that runs every 5 minutes and do a validation according to the scheduling time and the current time.
– Lucas Brogni