CFTABLE

Builds a table in your Cold Fusion template. Use the CFCOL tag to define column and row characteristics for a table.

CFTABLE
Attribute

Description

QUERY

The name of the CFQUERY from which you want to draw data.

MAXROWS

Optional. Specifies the maximum number of rows you want to display in the table.

COLSPACING

Indicates the number of spaces to insert between columns (default is 2).

COLHEADERS

If this tag is present, column headers are printed above each column. The contents of the headers are controlled by the HEADER attribute of the CFCOL tag.

HEADERLINES

Indicates the number of lines to use for the table header (the default is 2, which leaves one line between the headers and the first row of the table).

HTMLTABLE

Renders the table as an HTML 3.0 table.

BORDER

Adds a border to the table. Use only when you specify the HTMLTABLE attribute for the table.

STARTROW

Optional. Specifies the query row from which to start processing.

Example

<CFTABLE QUERY="GetMonthlyEvents" MAXROWS=10 >
   <CFCOL HEADER="<B>Event</B>" WIDTH=24 TEXT="#EventName#">  
   <CFCOL HEADER="<B>Time</B>" WIDTH=7 ALIGN=CENTER TEXT="#StartTime#">
   <CFCOL HEADER="<B>Ticket</B>" WIDTH=6 ALIGN=CENTER TEXT="$#CostPerPerson#">
   <CFCOL HEADER="<B>Description</B>" WIDTH=100 ALIGN=LEFT TEXT="#EventDescription#">
</CFTABLE>