shoez has asked for the wisdom of the Perl Monks concerning the following question:
I have been building a web based room booking application for my local school, using my newly founded Perl-OO skills (thanks goes to the Perl CD) :) More specifically it is for the media room, where reprobates, sorry, us students (12-18 y/o) go to perform part of their studies. These three rooms are normally booked, independently, for a period of days.
As I currently have it, the date ranges in which these rooms are booked get stored in a MySQL database. To query if a room is free for a particular period, all I do is perform an SQL query, with a WHERE clause something like -
(($startdate BETWEEN BookingStart AND BookingEnd) OR ($enddate BETWEEN BookingStart AND BookingEnd)) AND RoomID = ?
Now this is all well and good, and maybe this isn't even a Perl question, but I have racked my brains for some funky alternative method of performing it using my fav. language. The problem is, I just don’t see this being an efficient way. Could I ask the indulgence of the venerable monks in giving me a substitute means of either storing or querying this data please ?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Room Booking... any thoughts?
by BazB (Priest) on Jan 29, 2002 at 05:22 UTC | |
|
Re: Room Booking... any thoughts?
by poqui (Deacon) on Jan 29, 2002 at 03:15 UTC | |
|
Re: Room Booking... any thoughts?
by radiantmatrix (Parson) on Jan 30, 2006 at 21:20 UTC |