![MACROMEDIA COLDFUSION 4.5-CFML LANGUAGE Reference Download Page 237](http://html1.mh-extra.com/html/macromedia/coldfusion-4-5-cfml-language/coldfusion-4-5-cfml-language_reference_3287257237.webp)
Chapter 1: ColdFusion Tags
213
Usage
You can use the
CFCOL
tag to align the data in the table , specify the width of each
column, and provide column headers.
Note
CFCOL is the only tag that you can nest within CFTABLE.
Example
<!--- This example shows the use of CFCOL and CFTABLE
to align information returned from a query --->
<!--- This query selects employee information from the
cfsnippets datasource --->
<CFQUERY NAME="GetEmployees" DATASOURCE="cfsnippets">
SELECT Emp_ID, FirstName, LastName, EMail, Phone, Department
FROM Employees
</CFQUERY>
<HTML>
<HEAD>
<TITLE>CFTABLE Example</TITLE>
</HEAD>
<BODY>
<H3>CFTABLE Example</H3>
<!--- Note the use of the HTMLTABLE attribute to display the
CFTABLE as an HTML table, rather simply as PRE formatted information --->
<CFTABLE QUERY="GetEmployees" STARTROW="1" COLSPACING="3" HTMLTABLE>
<!--- each CFCOL tag sets the width of a column in the table,
as well as specifying the header information and the text/CFML
with which to fill the cell --->
<CFCOL HEADER = "<B>ID</B>"
ALIGN = "Left"
WIDTH = 2
TEXT = "#Emp_ID#">
<CFCOL HEADER = "<B>Name/Email</B>"
ALIGN = "Left"
WIDTH = 15
TEXT = "<a href=’mailto:#Email#’>#FirstName# #LastName#</A>">
<CFCOL HEADER = "<B>Phone Number</B>"
ALIGN = "Center"
WIDTH = 15
TEXT = "#Phone#">
</CFTABLE>
</BODY>
</HTML>
Summary of Contents for COLDFUSION 4.5-CFML LANGUAGE
Page 1: ...Allaire Corporation CFML Language Reference ColdFusion 4 5...
Page 207: ...Chapter 1 ColdFusion Tags 183 CFCATCH CFTRY BODY HTML...
Page 224: ...200 CFMLLanguageReference CFOUTPUT P Text within CFOUTPUT is always shown CFOUTPUT BODY HTML...
Page 336: ...312 CFMLLanguageReference CFIF BODY HTML...
Page 404: ...380 CFMLLanguageReference DE It is morning CFOUTPUT P BODY HTML...
Page 413: ...Chapter 2 ColdFusion Functions 389 Customer BalanceDue BR CFOUTPUT CFIF BODY HTML...
Page 483: ...Chapter 2 ColdFusion Functions 459 CFOUTPUT CFLOOP BODY HTML...
Page 584: ...560 CFMLLanguageReference...
Page 594: ...570 CFMLLanguageReference...