CFQUERY Variable Information

During the last procedure, the retrieved data does not display, but the data is available to the current page. Each time you query a database with the CFQUERY tag, query variables store:

Query properties variables

Query properties variables can help you format the data for display as well as debug an application.

The following table describes the query properties.

Property Description
RecordCount The total number of records returned by the query.
ColumnList Returns a comma-delimited list of the query columns.
CurrentRow The current row of the query being processed by CFOUTPUT.

Referencing query properties syntax example

The code below displays the number of records returned from the EmpList query - a query performed earlier on the same page:

The query returned #EmpList.RecordCount# client addresses.<BR>