Chapter 18: Building Custom CFAPI Tags
297
CCFXQuery::GetData
LPCSTR CCFXQuery::GetData(int
iRow
, int
iColumn
)
Retrieves a data element from a row and column of the query. Row and column indexes
begin with 1. You can determine the number of rows in the query by calling
CCFXQuery::GetRowCount
. You can determine the number of columns in the query by
retrieving the list of columns using
CCFXQuery::GetColumns
and then calling
CCFXStringSet::GetCount
on the returned string set.
Returns the value of the requested data element.
iRow
Row to retrieve data from (1-based).
lColumn
Column to retrieve data from (1-based).
Example
The following example iterates over the elements of a query and writes the data in the
query back to the user in a simple, space-delimited format:
int iRow, iCol ;
int nNumCols = pQuery->GetColumns()->GetCount() ;
int nNumRows = pQuery->GetRowCount() ;
for ( iRow=1; iRow<=nNumRows; iRow++ )
{
for ( iCol=1; iCol<=nNumCols; iCol++ )
{
pRequest->Write( pQuery->GetData( iRow, iCol ) ) ;
pRequest->Write( " " ) ;
}
pRequest->Write( "<BR>" ) ;
}
CCFXQuery::GetName
LPCSTR CCFXQuery::GetName(void)
Retrieves the name of the query. Returns the name of the query.
Example
The following example retrieves the name of the query and writes it back to the user:
CCFXQuery* pQuery = pRequest->GetQuery() ;
pRequest->Write( "The query name is: " ) ;
pRequest->Write( pQuery->GetName() ) ;
CCFXQuery::GetRowCount
LPCSTR CCFXQuery::GetRowCount(void)
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...