Ccfxquery::getdata; Ccfxquery::getname; Ccfxquery::getrowcount - MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Develop Manual

Developing web applications with coldfusion
Table of Contents

Advertisement

Chapter 18: Building Custom CFAPI Tags

CCFXQuery::GetData

LPCSTR CCFXQuery::GetData(int
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
CCFXStringSet::GetCount
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)
iRow
iColumn
, int
CCFXQuery::GetColumns
on the returned string set.
)
and then calling
297

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 4.5-DEVELOPING WEB and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Coldfusion 4.5

Table of Contents