irm-1.6-b3/MDB/ibase.php
/**
     * returns the number of rows in a result object
     *
     * @param ressource $result a valid result ressouce pointer
     * @return mixed MDB_Error or the number of rows
     * @access public
     */
returns the number of rows in a result object
@param ressource $result a valid result ressouce pointer
@return mixed MDB_Error or the number of rows
@access public
returns the number of rows in a result object @param ressource $result a valid result ressouce pointer @return mixed MDB_Error or the number of rows @access public
function numRows($result)
    {
        $result_value = intval($result);
        if (!isset($this->current_row[$result_value])) {
            return($this->raiseError(MDB_ERROR, NULL, NULL,
                'Number of rows: attemped to obtain the number of rows contained in an unknown query result'));
        }
        if (!isset($this->rows[$result_value][$this->highest_fetched_row[$result_value]])
            || $this->rows[$result_value][$this->highest_fetched_row[$result_value]] !== false
        ) {
            if (isset($this->limits[$result_value])) {
                if (MDB::isError($skipfirstrow = $this->_skipLimitOffset($result))) {
                    return $skipfirstrow;
                }
            }
            if (isset($this->row_buffer[$result_value])) {
                ++$this->highest_fetched_row[$result_value];
                $this->results[$result_value][$this->highest_fetched_row[$result_value]]
                    = $this->row_buffer[$result_value];
                unset($this->row_buffer[$result_value]);
            }
            if (!isset($this->results[$result_value][$this->highest_fetched_row[$result_value]])
                || $this->results[$result_value][$this->highest_fetched_row[$result_value]] !== false
            ) {
                while((!isset($this->limits[$result_value])
                    || ($this->highest_fetched_row[$result_value]+1) < $this->limits[$result_value][1]
                )
                    && (is_array($buffer = @ibase_fetch_row($result)))
                ) {
                    ++$this->highest_fetched_row[$result_value];
                    $this->results[$result_value][$this->highest_fetched_row[$result_value]] = $buffer;
                }
                ++$this->highest_fetched_row[$result_value];
                $this->results[$result_value][$this->highest_fetched_row[$result_value]] = false;
            }
        }
        return(max(0, $this->highest_fetched_row[$result_value]));
    }
function numRows ( $ result ) { $ result_value = intval ( $ result ) ; if ( ! isset ( $ this -> current_row [ $ result_value ] ) ) { return ( $ this -> raiseError ( MDB_ERROR , NULL , NULL , 'Number of rows: attemped to obtain the number of rows contained in an unknown query result' ) ) ; } if ( ! isset ( $ this -> rows [ $ result_value ] [ $ this -> highest_fetched_row [ $ result_value ] ] ) || $ this -> rows [ $ result_value ] [ $ this -> highest_fetched_row [ $ result_value ] ] !== false ) { if ( isset ( $ this -> limits [ $ result_value ] ) ) { if ( MDB :: isError ( $ skipfirstrow = $ this -> _skipLimitOffset ( $ result ) ) ) { return $ skipfirstrow ; } } if ( isset ( $ this -> row_buffer [ $ result_value ] ) ) { ++ $ this -> highest_fetched_row [ $ result_value ] ; $ this -> results [ $ result_value ] [ $ this -> highest_fetched_row [ $ result_value ] ] = $ this -> row_buffer [ $ result_value ] ; unset ( $ this -> row_buffer [ $ result_value ] ) ; } if ( ! isset ( $ this -> results [ $ result_value ] [ $ this -> highest_fetched_row [ $ result_value ] ] ) || $ this -> results [ $ result_value ] [ $ this -> highest_fetched_row [ $ result_value ] ] !== false ) { while ( ( ! isset ( $ this -> limits [ $ result_value ] ) || ( $ this -> highest_fetched_row [ $ result_value ] + 1 ) < $ this -> limits [ $ result_value ] [ 1 ] ) && ( is_array ( $ buffer = @ ibase_fetch_row ( $ result ) ) ) ) { ++ $ this -> highest_fetched_row [ $ result_value ] ; $ this -> results [ $ result_value ] [ $ this -> highest_fetched_row [ $ result_value ] ] = $ buffer ; } ++ $ this -> highest_fetched_row [ $ result_value ] ; $ this -> results [ $ result_value ] [ $ this -> highest_fetched_row [ $ result_value ] ] = false ; } } return ( max ( 0 , $ this -> highest_fetched_row [ $ result_value ] ) ) ; }
returns the number of rows in a result object
 @param ressource $result a valid result ressouce pointer
 @return mixed MDB_Error or the number of rows
 @access public
returns the number of rows in a result object @param ressource $result a valid result ressouce pointer @return mixed MDB_Error or the number of rows @access public
//$this->rows[$result_value] = 0;