<cftable>

Builds a table in a CFML page. Use the cfcol tag to define table column and row characteristics. The cftable tag renders data either as preformatted text, or, with the HTMLTable attribute, as an HTML table. Use cftable to create tables if you don't want to write HTML table tag code, or if your data can be well presented as preformatted text.

This tag must have a body.

This tag is also supported within <cfscript>

Attribute Description
query
string, required

Name of the cfquery from which to draw data.

border
boolean, optional

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

colspacing
number, optional

Number of spaces to insert between columns 'default is 2'.

colheaders
boolean, optional

Displays headers for each column, as specified in the cfcol tag.

startrow
number, optional

Specifies the query row from which to start processing.

maxrows
number, optional

Maximum number of rows to display in the table.

htmltable
boolean, optional

Renders the table as an HTML 3.0 table.

headerlines
number, optional

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.

<cftable
    query=string
    [border=boolean]
    [colspacing=number]
    [colheaders=boolean]
    [startrow=number]
    [maxrows=number]
    [htmltable=boolean]
    [headerlines=number]
><!--- body ---></cftable>

Examples

There are currently no examples for this tag.

See also