hi guys,
running into a problem. hope somebody can help.
i want to reserve a book. but dat reservation will be activated only for 15 hours.
So, i gave the call_no from the form and it reserve the book under the member name who supplied that call_no and his ID.
i wrote a script that find out the 15 hours from the time when the reservation made and save that time in the reservation time along with the call_no.
but i am just not sure how to inactivate that reservation after 15 hours?
When i run a php script i know i can check the column value and i can easily make the reservation inactivated.
but in this case when i m not about to run any php script but still wnt to see the reservation gets inactivated after the stipulated time, i aint got a clue how to do this.
can anybody give me any tips, idea?
shoudl i use any mysql specific funciton?
pls help
pls help.....how to?
Moderator: General Moderators
-
magicrobotmonkey
- Forum Regular
- Posts: 888
- Joined: Sun Mar 21, 2004 1:09 pm
- Location: Cambridge, MA
All you need to do is everytime some one uses the script, check for inactive reservations and remove them. Leave the end time there and check it. Just make sure you do it the first thing - I.E. on the log in page at the top. This will ensure that it is *like* the reservations are removed at the appropriate time, because the user will never be able to know that there is an active expired reservation there. Also, you might want to do it on every page as well, in case one expires while the user is there.
-
magicrobotmonkey
- Forum Regular
- Posts: 888
- Joined: Sun Mar 21, 2004 1:09 pm
- Location: Cambridge, MA