any suggestions please

Results 1 to 2 of 2

Thread: any suggestions please

  1. #1
    Join Date
    Dec 1969

    Default any suggestions please

    hi,<BR>I am working on online room booking system. I need some advices here:<BR>I)<BR>there are two screens<BR>1. to select a room<BR>2. booking a room<BR>How I can manage, when somebody is booking(he is in the process; ie second screen) let us say room 200, it should show as booked in screen 1. If he cancels it without booking the room it should show as available.<BR><BR><BR>II) How can I show a room&#039;s availablity(time slot) in 24hours (a person can book a room for 1 hour only) as graphically.<BR><BR>I hope this is not too confusing.<BR><BR>Thanks for any ideas/feed back in advance <BR>

  2. #2
    Join Date
    Dec 1969

    Default Here's a start

    I am assuming by screens you mean pages. You have one user in the booking process (page 2) and to another user that is just looking around (seeing what rooms are available) you want that particular room to show as booked so you don&#039;t end up with two (or more) users entering in to the booking process on the same room.<BR><BR>With that said, here&#039;s what I would do.<BR><BR>Create a table called BookingSessions<BR>BookingSessionsID<BR>sessionID< BR>roomNumber<BR>expireTime<BR><BR>When a user enters into the booking process create a new record.<BR><BR>When the available room rs is SELECTed make sure it&#039;s not in BookingSessions as well, and if it is the time must be greater than expireTime.<BR><BR>When a user tries to follow through with the booking, if his SessionID is in BookingSessions and the time is less than expireTime let it go through, if not make <BR>sure the room is still available (i.e., in your available rooms rs and NOT in BookingSessions with an expireTime &#062; current time)<BR>If it&#039;s available you can let it go through. If it&#039;s not you&#039;ll have to explain to them nicely that they waited to long. You should imform them of the possibility before hand, i.e., you have one hour to book this room.<BR><BR>That&#039;s how I would do it off the top of my head, I&#039;m sure you&#039;ll have little details to work out before it will work.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts