English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hello,

Is it possible to modify an entry in a database for a specific time and then if an event doesn't occur after that time ahs exceeded, to automatically put it back to the original value?

It might help if I explain my problem

I am a hotel and i am writing my own booking system.

I want guests to specify when they want to come to the hotel and at that moment i want to "hold" the room until they make payment. If they don't make the payment i want to "release" the room again.

Any advice and suggestions would be great.

i am writing it in PHP and I have a mysql database.

2006-07-02 23:02:52 · 2 answers · asked by digitaldanuk 2 in Computers & Internet Programming & Design

2 answers

i dont know if this will help you completely but you can use this logic. here it goes:

check on the page wherever you need to display the rooms that if at the time of opening of the page, there is any room on hold whose payment has not been made and then change the value.

let me explain more:

see if a custtomer puts a page on hold and does not make a payment in the required time, then after some time another customer visits your php page which displays available rooms. now here you first check that if any room on hold has not been paid for in the required time then change the value of the entry for the room and display the free rooms.

i know its not a perfect solution... but it still does work, real time.

2006-07-02 23:14:49 · answer #1 · answered by loveme 2 · 0 0

Do you have the capability of setting a cron or other such program to fire a procedure on a scheduled basis? When you 'hold' a room, set a date/time on the record. (A column for hold until date or something like that). Then, develop the procedure to check on a scheduled basis, loop thru all 'held' rooms, checking for payment entry for the room in question, and if not found, release the hold flag from the room. You can set the schedule to be at whatever interval you want.

2006-07-03 06:09:31 · answer #2 · answered by Arlene06 4 · 0 0

fedest.com, questions and answers