Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

cfqueryparam with list

Explorer ,
Oct 15, 2012 Oct 15, 2012

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>

TOPICS
Getting started
616
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 15, 2012 Oct 15, 2012
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources