nerdexam
Adobe

9A0-127 · Question #91

Given the following code: <cfset form.lcategories = "1,3,5"> <cfquery name="qcategories"> select * from category where categoryid in <!--- insert cfqueryparam here ---> </cfquery> Which command…

The correct answer is A. ( <cfqueryparam cfsqltype="cf_sql_numeric" value="#form.lcategories#" list="yes">). See the full explanation below for the reasoning.

Question

Given the following code:

<cfset form.lcategories = "1,3,5"> <cfquery name="qcategories"> select * from category where categoryid in <!--- insert cfqueryparam here ---> </cfquery> Which command results in a successful query execution?

Options

  • A( <cfqueryparam cfsqltype="cf_sql_numeric" value="#form.lcategories#" list="yes">)
  • B(<cfqueryparam cfsqltype="cf_sql_varchar" value="#form.lcategories#" list="yes">)
  • C(<cfqueryparam cfsqltype="cf_sql_varchar" value="#form.lcategories#" >)
  • D(<cfqueryparam cfsqltype="cf_sql_numeric" value="#form.lcategories#" >)

How the community answered

(41 responses)
  • A
    73% (30)
  • B
    10% (4)
  • C
    2% (1)
  • D
    15% (6)

Community Discussion

No community discussion yet for this question.

Full 9A0-127 Practice