Skip to main content
Inspiring
October 15, 2012
Question

cfqueryparam with list

  • October 15, 2012
  • 1 reply
  • 656 views

hi,

i have a query (# 1) is orginal, i need to put it into cfqueryparam (#2).  I don't know why my #2 is not getting any results back.  what's wrong and diffrent b.w two?

Thanks

==========

#1: record returned

<<cfquery>

......

and contract_number in (#quotedvaluelist(getcontract.contract_num)#)

</cfquery>

#2: nothing returned

<cfset variables.ctList = quotedvaluelist(getcontract.contract_num) />

<cfquery>

.......

and contract_number in (<cfqueryparam value="#variables.cList#" list="yes" />)

        

</cfquery>

This topic has been closed for replies.

1 reply

Inspiring
October 15, 2012

You overengineered it.  Queryparam adds the quotes for you which means combining it with quotedvaluelist adds two sets of quotes.