Weird error in cfquery , cannot use cfelse in cfquery ?
<cfargument name="StateID" type="any" default="">
<cfargument name="LocationID2" type="any" default="">
<cfset var data ="">
<cfquery datasource="#ds#" name="data">
SELECT s.State_ID, s.State, l.Location_ID, l.Area, l.State_ID, r.Name, r.Location_ID
FROM State s, Location l, Restaurants r
WHERE 0=0
AND r.Location_ID = l.Location_ID
AND l.State_ID = s.State_ID
<cfif #ARGUMENTS.LocationID2# LT 9>
AND l.State_ID = (#ARGUMENTS.LocationID2#)
<cfelse>
AND l.Location_ID = (#ARGUMENTS.LocationID2#)
</cfif>
This is the code in component file, it is working with normal form with action.
But when i try to make it with ajax, something like <cfdiv bind="......." > , it get error with
58 : AND l.St
ate_ID = (#ARGUMENTS.LocationID2#)
59 : <cfelse>
60 : AND l.Location_ID = (#ARGUMENTS.LocationID2#)
61 : </cfif>
but when i take away the cfelse , it working without any error. I just feel weird , can some one please give me some tips ?
