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?

Recommended Answers

All 3 Replies

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..??

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.