Based on Ashely's reply, I created the following scheme:
The table "Rooms" has the following fields.
- id (PK)
- room_no (varchar)
- status (ENUM: Busy, Reserved)
the other table, "RoomLogs", has the following fields:
- room_id (the id from above table)
- status_modified_on (date)
- status (enumerated value - 'busy','reserved')
The problem is to generate a graph to display status of rooms in different
time (daily, weekly, monthly).
X Axis = Status (Busy, Reserved)
Y Axis = Number of rooms with a certain status (the last status for each
room makes sense)
On Tue, Aug 18, 2009 at 8:13 PM, Ralph Deffke <ralph_def...@yahoo.de> wrote:
> to answer this is in fact not possible on the base of information u give.
> I dont think there is a general db outlay for hotels. it depends how the
> "booking" tables are designed.
> does the application excist or u are doing a new one?
> if it excist, have a look how the availability of a room is calculated and
> then go from there. it would be the same calculation, just with backwards
> hope that helps
> "Behzad" <behzad.esl...@gmail.com> wrote in message
> > Dear list,
> > e-Greetings!
> > 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
> > 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
> > ?
> > I would appreciate if you take a brief moment of your time and share your
> > opinion.
> > Thank you in advance,
> > -b
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php