iAnywhere
                  North America  [Change]
Home | Events | Downloads | Partners | Developers | Contact Us
CompanySolutionsServices & SupportOur CustomersHow to Buy

sqlanywhere_num_rows


Prototype

resource sqlanywhere_num_rows( resource result_identifier )
Description
Returns the number of rows that the result_identifier contains.
Parameters
result_identifier      The result identifier returned by a sqlanywhere_query function.
Returns
A positive number if the number of rows is exact, or a negative number if it is an estimate. To get the exact number of rows, the database option row_counts must be set permanently on the database, or temporarily on the connection.
Example
This example shows how to retrieve the estimated number of rows returned in a result set.
$num_rows = sqlanywhere_num_rows( $result );
   if( $num_rows < 0 ) {
       $num_rows = abs( $num_rows );    # take the absolute value as an estimate
   }
Related functions
sqlanywhere_query

Back to Top

    
 ©Copyright 2008 iAnywhere Solutions, Inc.