0

I have 2 queries and I want to use the <cfqueryparam> tag on it but am not sure how to do it for this query:

    <cfif isdefined("FORM.chk3g")>
        ThreeG IS NOT NULL AND
    </cfif>

    <cfif isdefined("FORM.chkpolyphonic")>
        ringtonetype like '%polyphonic%' AND
    </cfif>
James A Mohler
  • 11,060
  • 15
  • 46
  • 72
tan369
  • 162
  • 1
  • 1
  • 8
  • Is `polyphonic` a constant or a `#variable#`? There is really [no benefit to using cfqueryparam with constants](http://stackoverflow.com/questions/17574276/how-can-cfqueryparam-affect-performance-for-constants-and-null-values/17582859#17582859). – Leigh Sep 30 '13 at 12:13

1 Answers1

0

Try something like this

<cfif isdefined("FORM.chk3g")>
    ThreeG IS NOT NULL AND
</cfif>

<cfif isdefined("FORM.chkpolyphonic")>
    ringtonetype like <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="%polyphonic%"> AND
</cfif>
James A Mohler
  • 11,060
  • 15
  • 46
  • 72