Hi,
I have a calendar w/data stored in SQL Server. People can reserve multiple dates for an event. Before a reservation is confirmed, I want to be able to see if the dates have already been reserved.
I first query the dates for the unconfirmed reservation. I then want to query the database for all other records matching those dates. However, when I reference the dates from my first query, my output only shows one of the dates. For example:
<cfquery name = "newreserve" datasource = "mydata"
select reservedate
from mytable
where url.id = reserveid
</cfquery>
<cfoutput query = "newreserve">
<cfquery name = "duplicates" datasource = "mydata">
select *
from mytable
where reservedate = #newreserve.reservedate#
</cfquery>
</cfoutput>
<cfoutput query = "duplicates">
#reservedate#
</cfoutput>
I know I'm doing something very wrong, but don't know what it is.
Thank you!