irm-1.6-b3/MDB/ibase.php
/**
     * Execute a query
     * @param string $query the SQL query
     * @return mixed result identifier if query executed, else MDB_error
     * @access private
     **/
Execute a query
@param string $query the SQL query
@return mixed result identifier if query executed, else MDB_error
@access private
Execute a query @param string $query the SQL query @return mixed result identifier if query executed else MDB_error @access private
function _doQuery($query, $first=0, $limit=0, $prepared_query=0)  
    {
        $connection = ($this->auto_commit ? $this->connection : $this->transaction_id);
        if ($prepared_query
            && isset($this->query_parameters[$prepared_query])
            && count($this->query_parameters[$prepared_query]) > 2)
        {
            $this->query_parameters[$prepared_query][0] = $connection;
            $this->query_parameters[$prepared_query][1] = $query;
            $result = @call_user_func_array("ibase_query", $this->query_parameters[$prepared_query]);
        } else {
            $result = @ibase_query($connection, $query);
            while (@ibase_errmsg() == 'Query argument missed') { 
                $this->connect();
                if ($this->transaction_id) {
                    $this->rollback();
                }
                $result = @ibase_query($this->connection, $query);
            }
        }
        if ($result) {
            if (!MDB::isManip($query)) {
                $result_value = intval($result);
                $this->current_row[$result_value] = -1;
                if ($limit > 0) {
                    $this->limits[$result_value] = array($first, $limit, 0);
                }
                $this->highest_fetched_row[$result_value] = -1;
            } else {
                $this->affected_rows = -1;
            }
        } else {
            return ($this->raiseError(MDB_ERROR, NULL, NULL,
                '_doQuery: Could not execute query ("'.$query.'"): ' . @ibase_errmsg()));
        }
        return $result;
    }
function _doQuery ( $ query , $ first = 0 , $ limit = 0 , $ prepared_query = 0 ) { $ connection = ( $ this -> auto_commit ? $ this -> connection : $ this -> transaction_id ) ; if ( $ prepared_query && isset ( $ this -> query_parameters [ $ prepared_query ] ) && count ( $ this -> query_parameters [ $ prepared_query ] ) > 2 ) { $ this -> query_parameters [ $ prepared_query ] [ 0 ] = $ connection ; $ this -> query_parameters [ $ prepared_query ] [ 1 ] = $ query ; $ result = @ call_user_func_array ( " ibase_query " , $ this -> query_parameters [ $ prepared_query ] ) ; } else { $ result = @ ibase_query ( $ connection , $ query ) ; while ( @ ibase_errmsg ( ) == 'Query argument missed' ) { $ this -> connect ( ) ; if ( $ this -> transaction_id ) { $ this -> rollback ( ) ; } $ result = @ ibase_query ( $ this -> connection , $ query ) ; } } if ( $ result ) { if ( ! MDB :: isManip ( $ query ) ) { $ result_value = intval ( $ result ) ; $ this -> current_row [ $ result_value ] = - 1 ; if ( $ limit > 0 ) { $ this -> limits [ $ result_value ] = array ( $ first , $ limit , 0 ) ; } $ this -> highest_fetched_row [ $ result_value ] = - 1 ; } else { $ this -> affected_rows = - 1 ; } } else { return ( $ this -> raiseError ( MDB_ERROR , NULL , NULL , '_doQuery: Could not execute query ("' . $ query . '"): ' . @ ibase_errmsg ( ) ) ) ; } return $ result ; }
Execute a query
 @param string $query the SQL query
 @return mixed result identifier if query executed, else MDB_error
 @access private
Execute a query @param string $query the SQL query @return mixed result identifier if query executed else MDB_error @access private
// function _doQuery($query) //Not Prepared Query //ibase_errcode() only available in PHP5 //connection lost, try again... //rollback the failed transaction to prevent deadlock and execute the query again