Question
Searching on Dates
I need to get a column back from a database called
room_booked when the user types in a search based on a range of
dates.
<cfquery datasource = "getroombooked" datasource = "rayannesql">
SELECT book_room
FROM booking
T
his is where I start to wonder do I do a BETWEEN range with a date something like
WHERE ((booking.bookcheckin_date BETWEEN #CreateODBCDate(form.arrivalDate)# AND #CreateODBCDate(form.departDate)#))
I then need to do a <cfif statement to see what rooms are booked.
<cfif book_room is not "">
<cfoutput>#book_room#>
Any help on this would be greatly appreciated
<cfquery datasource = "getroombooked" datasource = "rayannesql">
SELECT book_room
FROM booking
T
his is where I start to wonder do I do a BETWEEN range with a date something like
WHERE ((booking.bookcheckin_date BETWEEN #CreateODBCDate(form.arrivalDate)# AND #CreateODBCDate(form.departDate)#))
I then need to do a <cfif statement to see what rooms are booked.
<cfif book_room is not "">
<cfoutput>#book_room#>
Any help on this would be greatly appreciated