Thanks, p.sim. I'm not sure if what I'm trying to do is that complicated, however the example you provided will be helpful for other projects.
Basically, upon form submission, I want CF to query my db table of dates and if one of those dates matches the date the user selected from a drop down in the form, CF will insert one of two text responses. So something like,
<cfif #form.VisitDate# eq any of the dates in #query.OpenDate#>Insert response 1<cfelse>insert response 2</cfif>
Maybe I'm missing something or overthinking it...
Oh, sorry I misunderstood.
"upon form submission" -- Then in the action page, you create a query against the submitted date.
WHERE date_column = <cfqueryparam value="#form.submittedDate#" cfsqltype="cf_sql_date">
The if statement looks like this:
<!--- if record found --->
Insert response 1
insert response 2
Thanks again, p.sim. I was way overthinking this. For some reason I thought I would have to output all dates from the DB and create script for CF to look over them all.
This is just what I was looking to do!