User Guide
Getting Information About Query Results 33
You now display the number of records retrieved in the query. The following table
describes the code and its function:
Query properties notes and considerations
When using query properties, keep the following guidelines in mind:
• Reference the query property within a cfoutput block so that ColdFusion
outputs the query property value to the page.
• Surround the query property reference with pound signs (#) so that ColdFusion
knows to replace the property name with its current value.
• Do not use the
cfoutput tag query attribute when you output the RecordCount
or ColumnList property. If you do, you will get one copy of the output for each
row. Instead, prefix the property with the name of the query.
Code Description
<cfoutput>
Display what follows
The query returned
Display the text “The query returned”
#EmpList.RecordCount#
Display the number of records retrieved in the EmpList
query
records
Display the text “records”
</cfoutput>
End the cfoutput block.