Sure, that is easy. Just add a column to your room assignment table called
something like "RELEASE_TIME", and put into that column the time you want
the room to be released. Then, whenever you want to release rooms, execute
something like "DELETE FROM ROOM_ASSIGN WHERE RELEASE_TIME > NOW()" or if
you mark a status flag, do an update instead of a delete. Since PHP is
primarily intended for web applications, it might be better to execute this
SQL statement via a Perl script that is triggered automatically as a CRON
job, assuming you are using a real operating system like Unix or Linux. If
you are using Windows, then you will have a tougher time since the
operating system is severely lacking in basic services like true batch
jobs, powerful scripting languages, etc. I have been a Windows developer
ever since 3.0 came out, and I recently got introduced to the wonderful
world of Linux. The differences are staggering. Hope this helps.
-Ken
At 11:27 PM 6/5/01 +0500, Hasan Niyaz wrote:
>Hi,
>
>I have a room inventory. Clients can block rooms them but I want to
>release them after a specified time if they do not release them
>normally via the given link. I want to be able to trigger an event to
>release the rooms after the time limit.
>Is there any way I can do this with MySQL or PHP.
>
>Thanks,
>Hasan
>
>ps. I use a PHP interface.
>
>
>
>---------------------------------------------------------------------
>Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail
><[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php