Avoiding Double bookings via 'reserved' status
Hi there,
I am wondering if anyone knows the best way to tackle this problem.
I am setting a site up where clients can book holiday homes on line. One thing I am concerned about is that after a customer has selected their dates out of the ones marked 'unbooked', while they are filling in their details etc someone else might go ahead and book the same dates and screw everything up. This is a bit more likely with this company as they have alot of potential clients who all want things at the same times (i.e. holidays) and not that many holiday homes at the moment.
One thought I had was to add a 'reserved' status to the selected dates in the bookings table and make those dates appear as unavailable to anyone else. The problem I can see with this though is that if the clients computer crashes, or hangs up, or they get distracted, whatever, these dates stay in the database as reserved and this unbookable. How could one make the database refresh itself to get rid of any bookings with a 'reserved' status that are over a certain time old and how can it check before it does so that customer x hasn't just that second come back to finish ther booking off!
Does anyone know what the standard way around this problem is, on like flight and hotel booking sites and such? And please I am a noobie so please talk s l o w l y...
Thanks
|