I would create a room history table that contained three fields: room number, status, date stamp. Each time the status of a room changes insert a new record into the table with the current status and date/ time.

Take care,

On Aug 18, 2009, at 10:45 AM, Behzad wrote:

Dear list,

I'm faced with an interesting and challenging problem.

Consider a database, designed for a hotel.
At any given time, each room has a different status: It's Busy or Reserved,
or Free.

It's easy to retrieve number of Free rooms at the current time.
But how can I count the number of rooms that were busy during the last week

I would appreciate if you take a brief moment of your time and share your

Thank you in advance,

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to