I am currently designing an application form that the user fills to use a room in a specified time. The application is to check if the room specified is available at the time period specified. I am stil wondering how to do this such that there is no clash. Any info will be very helpful.
imolorhe
-6
Junior Poster in Training
Recommended Answers
Jump to PostYou need to store the details of the room in database with a flag for empty/occupied.
Jump to PostAll the rooms will be part of a single table.
The flag needs to be set to available when ever it is available, occupied otherwise.
Jump to PostI believe that the flags system isn't the best way to go with this. If you flag, then you force pre-defined time slots for a resource. This means that if I need the resource for 09:45 - 11:15 I have to book them from 09:00 until 12:00.
Why not …
Jump to PostNot necessarily. the status of the room will be availble before 09:45 and after 11:15.
It will be occupied during 09:45 - 11:15 only.
You need to maintain separate tables for rooms and rooms bookings.
Jump to PostNo a separate table for booking information , there you need to store room number with booking start and end time with date.
All 17 Replies
debasisdas
580
Posting Genius
Featured Poster
imolorhe
-6
Junior Poster in Training
debasisdas
580
Posting Genius
Featured Poster
imolorhe
-6
Junior Poster in Training
adam_k
239
Master Poster
imolorhe
-6
Junior Poster in Training
debasisdas
580
Posting Genius
Featured Poster
imolorhe
-6
Junior Poster in Training
debasisdas
580
Posting Genius
Featured Poster
imolorhe
-6
Junior Poster in Training
debasisdas
580
Posting Genius
Featured Poster
imolorhe
-6
Junior Poster in Training
imolorhe
-6
Junior Poster in Training
imolorhe
-6
Junior Poster in Training
debasisdas
580
Posting Genius
Featured Poster
adam_k
239
Master Poster
imolorhe
-6
Junior Poster in Training
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.