MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual page 432

Developing coldfusion mx applications
Table of Contents

Advertisement

<cfoutput query="EmpList">
#EmpList.FirstName#, #EmpList.LastName#, #EmpList.Salary#,
#EmpList.Contract#<br>
</cfoutput>
</body>
</html>
Save the file and view it in your web browser:
2
A list of employees appears in the browser, with each line displaying one row of data.
Note: You might need to refresh your browser to see your changes.
You created a ColdFusion application page that retrieves and displays data from a database. At
present, the output is raw and needs formatting. For more information, see
Formatting Data" on page
Reviewing the code
The results of the query appear on the page. The following table describes the highlighted code
and its function:
Code
<cfoutput query="EmpList">
#EmpList.FirstName#,
#EmpList.LastName#,
#EmpList.Salary#,
#EmpList.Contract#
<br>
</cfoutput>
432
Chapter 20: Accessing and Retrieving Data
559.
Description
Displays information retrieved in the EmpList query.
Displays the value of the
Contract
spaces.
Inserts a line break (go to the next line) after each record.
Ends the
FirstName
fields of each record, separated by commas and
block.
cfoutput
"Retrieving and
,
,
, and
LastName
Salary

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION MX 61-DEVELOPING COLDFUSION MX and is the answer not in the manual?

This manual is also suitable for:

Coldfusion mx

Table of Contents