Query Variable Notes And Considerations - MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual

Developing coldfusion mx applications
Table of Contents

Advertisement

<cfoutput>
The query returned #EmpList.RecordCount# records.
</cfoutput>
</body>
</html>
Save the file and view it in your web browser:
2
The number of employees now appears below the list of employees. You might have to refresh
your browser and scroll to see the RecordCount output.
Note: The variable
the query to complete. Do not prefix the variable name with the query name.
Reviewing the code
You now display the number of records retrieved in the query. The following table describes the
code and its function:
Code
<cfoutput>
The query returned
#EmpList.RecordCount#
records.
</cfoutput>

Query variable notes and considerations

When using query variables, keep the following guidelines in mind:
Reference the query variable within a
variable value to the page.
Surround the query variable reference with pound signs (#) so that ColdFusion knows to
replace the variable name with its current value.
434
Chapter 20: Accessing and Retrieving Data
cfquery.executionTime
Description
Displays what follows.
Displays the text "The query returned".
Displays the number of records retrieved in the EmpList query.
Displays the text "records."
Ends the
contains the amount of time, in milliseconds, it took for
block.
cfoutput
block so that ColdFusion outputs the query
cfoutput

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents