I have hardcoded (bad-i know) a table for a May events calendar. Users can search for events by choosing one option at a time. If the search phrase matches I want to change the color of the cell and output the day number for the event date on the calendar. If the search phrase does not match I want to just output the day number on the calendar. I have a query to pull the information from the database and a cfif statement to check if the calendar date matches the start date of the event. My problem is that if there is more than one event match for the given day the output on the calendar is equal to the number of matches. For example, if 2 events match there are 2 outputs on the calendar. To try to fix this I created a cfif statement to check if the recordcount is greater than 0. This works within the first cfif statement but not in the cfelse part. I have no idea why it works in one place and not the other. I assume I have something wrong, but I am stumped! My code is pasted below. Also, you can see what is happening here http://r.assoclink.com/cnorris/carolyn/calendar/
by doing a search for "Baltimore County" . I have another small problem with this same page. Do I need to submit a new question for it?
Thanks in advance for any help during this holiday weekend!
<cfset current_date = #DateFormat(cal_date, 'mm/dd/yy')#>
<cfquery name="qry_getdate" datasource="cnorris_calend
SELECT DISTINCT startdate
WHERE event_county = '#form.searchcounty#'
ORDER by startdate
<cfoutput query="qry_getdate" group="startdate">
<cfset new_startdate = #Dateformat(qry_getdate.st
<cfif cal_date EQ new_startdate>
<table border="0" width="100%" height="5">
<td bgcolor="##99CCFF" align="right" valign="top" height="100%">
<cfoutput><cfif qry_getdate.recordcount GT 0><a href="dsp_getcountysearch-
<table border="0" width="1" height="1">
<td align="right" valign="top"><cfoutput><cf
if qry_getdate.recordcount GT 0><a href="dsp_getcountysearch-