Adobe
9A0-127 · Question #83
Click the Exhibit button. The table person contains the data shown in the exhibit. You have issued the following query: <cfquery name="qPeople" datasource="myDatasource"> select * from person where…
The correct answer is C. <cfqueryparam cfsqltype="cf_sql_varchar" value="#form.search#%">. See the full explanation below for the reasoning.
Question
Click the Exhibit button. The table person contains the data shown in the exhibit. You have issued the following query:
<cfquery name="qPeople" datasource="myDatasource"> select * from person where lastname like <!--- insert code here ---> </cfquery> Which ColdFusion expression safely parameterizes the query to return all records that have lastnames starting with data input to a form field (form.search)?
Exhibit
Options
- A<cfqueryparam cfsqltype="cf_sql_char" value="#form.search#*">
- B<cfqueryparam cfsqltype="cf_sql_string" value="#form.search#_">
- C<cfqueryparam cfsqltype="cf_sql_varchar" value="#form.search#%">
- D<cfqueryparam cfsqltype="cf_sql_varchar" value="%#form.search#%">
How the community answered
(58 responses)- A3% (2)
- B12% (7)
- C79% (46)
- D5% (3)
Community Discussion
No community discussion yet for this question.
