daddio2005
Programmer
I need to be able to search through a database of property bookings and retreive all properties that are available within the date range specified.
For example:
Arrive: 7 Dec 2005 for 7 Nights.
So availability of a property needs to be: 7 Dec - 14 Dec
I assume I will have a table of property bookings as follows:
BOOKINGS TABLE
PropID PropStart PropEnd PropLength
3 03/12/05 13/12/05 10
5 03/12/05 13/12/05 10
3 15/12/05 28/12/05 13
7 01/01/06 15/01/06 14
Obviously I have another table of property details which relate to the PropID in the above bookings table.
PROPERTY TABLE
PropID PropName
3 My House
5 His House
7 Her House
I want a search box which specifies start date and length (can work out end date from that if required), when submitted returns the details of properties available for this length of time.
I think this will be a tricky one to execute!
Any help on this would be most appreciated.
For example:
Arrive: 7 Dec 2005 for 7 Nights.
So availability of a property needs to be: 7 Dec - 14 Dec
I assume I will have a table of property bookings as follows:
BOOKINGS TABLE
PropID PropStart PropEnd PropLength
3 03/12/05 13/12/05 10
5 03/12/05 13/12/05 10
3 15/12/05 28/12/05 13
7 01/01/06 15/01/06 14
Obviously I have another table of property details which relate to the PropID in the above bookings table.
PROPERTY TABLE
PropID PropName
3 My House
5 His House
7 Her House
I want a search box which specifies start date and length (can work out end date from that if required), when submitted returns the details of properties available for this length of time.
I think this will be a tricky one to execute!
Any help on this would be most appreciated.