28
4
<CFOUTPUT>
4
The query returned #EmpList.RecordCount# records.
4
</CFOUTPUT>
</BODY>
</HTML>
3.
Save the file as
4.
View the page in a browser.
The number of employees now appears below the list of employees.
Code Review
You now display the number of records retrieved in the query.
Code
<CFOUTPUT>
The query returned
#EmpList.RecordCount#
records.
</CFOUTPUT>
Query Properties Notes and Considerations
Keep the following in mind when using query properties:
Prefix the property with its type — in this case — prefix the property with the
name of the query.
Reference the query property within a CFOUTPUT block so that ColdFusion
will output the query variable 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.
.
emplist.cfm
Description
Display what follows
Display the text "The query returned"
Display the number of records
retrieved in the EmpList query
Display the text "records"
End the CFOUTPUT block.
Developing Web Applications with ColdFusion
Need help?
Do you have a question about the COLDFUSION 4.5-DEVELOPING WEB and is the answer not in the manual?