Chapter 18: Building Custom CFAPI Tags
313
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 "
+ Integer.toString(rows) ) ;
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++ )
{
response.write( query.getData( iRow, iEMail ) + "<BR>" ) ;
}
Parameters:
name
— Name of column to get index of (lookup is case insensitive)
Returns:
The index of the column (returns -1 if no such column exists).
See Also:
getColumns, getData
getColumns
public String[] getColumns()
Summary of Contents for COLDFUSION 4.5-DEVELOPING WEB
Page 1: ...Allaire Corporation Developing Web Applications with ColdFusion ColdFusion 4 5...
Page 14: ...xiv Developing Web Applications with ColdFusion...
Page 26: ...xxvi Developing Web Applications with ColdFusion...
Page 34: ...8 Developing Web Applications with ColdFusion...
Page 70: ...44 Developing Web Applications with ColdFusion...
Page 84: ...58 Developing Web Applications with ColdFusion...
Page 114: ...88 Developing Web Applications with ColdFusion...
Page 148: ...122 Developing Web Applications with ColdFusion...
Page 174: ...148 Developing Web Applications with ColdFusion...
Page 208: ...182 Developing Web Applications with ColdFusion...
Page 244: ...218 Developing Web Applications with ColdFusion...
Page 274: ...248 Developing Web Applications with ColdFusion...
Page 288: ...262 Developing Web Applications with ColdFusion...
Page 300: ...274 Developing Web Applications with ColdFusion...
Page 350: ...324 Developing Web Applications with ColdFusion...
Page 362: ...336 Developing Web Applications with ColdFusion...