I need some help with <cfquery>, I want to authenticate an add form so the user doesn't enter the same value twice or more so I used recordcount like this
<cfquery name="cool.recordcount" datasource="#Request.proto#">
<cfif cool EQ 0>
INSERT INTO proton(
name,
moon
)
VALUES(
'#Trim(Form.name)#',
'#Trim(Form.moon)#',
)
<cfif cool EQ 0>
<cfelse>
THIS RECORD ALREADY EXIST
<cfinclude template="adduser.cfm">
</cfif>
</cfquery>
but it throws an error like Variable COOL is undefined. I am also using anplication.cfm Application.cfm also in my form, is their anything you can see I am doing wrong or do I have to define the query name cool, it is already defined in the cfquery?