cfif question - probably easy but I don't get it
What's wrong with this cf code? I need to search a db table only if there is a contactid. (Other records are inventory and not pertinent to my search. So, I want to search for two different fields, date and date2, but only if there is a contactid. There must be some way to do this.
<cfset CurrentPage=GetFileFromPath(GetTemplatePath())>
<cfif (rsRes10.contactid) GTE 1>
<cfquery name="rsRes10" datasource="Petersen">
SELECT *
FROM res10
WHERE date="8/25" OR date2="8/25"
group by date, classname
<cfelse>
null
</cfif>
</cfquery>
Thanks for your help,
Tedra
