Ccfxquery::getname; Ccfxquery::getrowcount - MACROMEDIA COLDFUSION MX 61-CFML Reference

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

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

Syntax
LPCSTR CCFXQuery::GetName(void)
Description
Returns the name of a query.
Example
The following example retrieves the name of a query and writes it back to the user:
CCFXQuery* pQuery = pRequest->GetQuery() ;
pRequest->Write( "The query name is: " ) ;
pRequest->Write( pQuery->GetName() ) ;

CCFXQuery::GetRowCount

Syntax
int CCFXQuery::GetRowCount(void)
Description
Returns the number of rows contained in a query.
Example
The following example retrieves the number of rows in a query and writes it back to the user:
CCFXQuery* pQuery = pRequest->GetQuery() ;
char buffOutput[256] ;
wsprintf( buffOutput,
"The number of rows in the query is %ld.",
pQuery->GetRowCount() ) ;
pRequest->Write( buffOutput ) ;
CCFXQuery class
755

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents