MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Develop Manual page 339

Developing web applications with coldfusion
Table of Contents

Advertisement

Chapter 18: Building Custom CFAPI Tags
Returns:
The name of the query.
getRowCount
public int getRowCount()
Retrieves the number of rows in the query.
The following example retrieves the number of rows in a query and writes it back
to the user:
Query query = request.getQuery() ;
int rows = query.getRowCount() ;
response.write( "The number of rows in the query is "
Returns:
The number of rows contained in the query.
getColumnIndex
public int getColumnIndex(String name)
Retrieves the index of a column given its name.
The following example retrieves the index of the EMAIL column and uses it to
output a list of the addresses contained in the column:
// Get the index of the EMAIL column
int iEMail = query.getColumnIndex( "EMAIL" ) ;
// Iterate over the query and output list of addresses
int nRows = query.getRowCount() ;
for( int iRow=1; iRow<=nRows; iRow++ )
{
}
Parameters:
name
Returns:
The index of the column (returns -1 if no such column exists).
See Also:
getColumns, getData
getColumns
public String[] getColumns()
+ Integer.toString(rows) ) ;
response.write( query.getData( iRow, iEMail ) + "<BR>" ) ;
— Name of column to get index of (lookup is case insensitive)
313

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 4.5

Table of Contents