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)- A73% (30)
- B10% (4)
- C2% (1)
- D15% (6)
Community Discussion
No community discussion yet for this question.