In my website on trip planner,I want that user can check if room is available or not...b/w particular dates..
how can i do this?
also..how shud i create the database..??as in what atrributes shud i use?

8 Years
Discussion Span
Last Post by wilch

Well for your database you can create a table called tblRooms, which contains the following fields:
- room_id (primary key)
- room_name (varchar)
- room_features (string/text ?!?)
- is_booked (boolean)
- date_booked (date)
- duration_booked (integer => num of days)

Now to check if the room is available between certain dates, you search for the range of dates from (date_booked) to the (date_booked + duration_booked) date.

I also think, you should have a table tblBookings, to store all of your bookings. This table must also have the foreign key room_id from the tblRooms.

The design, is not so perfect as i can perceive other things already, but it should give you an idea of the course to take.


I didn't understand clearly ..
cn u gv me C# code..4 this trip planner..??

Edited by shweta_babbar: n/a


Sorry mate, but my c# is not so sharp, if you could write something out, and then i will aid you along the way ! :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.