irm-1.6-b3/MDB/ibase.php
/**
     * Connect to the database
     *
     * @return TRUE on success, MDB_Error on failure
     * @access public
     **/
Connect to the database
@return TRUE on success, MDB_Error on failure
@access public
Connect to the database @return TRUE on success MDB_Error on failure @access public
function connect()
    {
        $port = (isset($this->options['port']) ? $this->options['port'] : '');
        $database_file = $this->getDatabaseFile($this->database_name);
        if ($this->connection != 0) {
            if (!strcmp($this->connected_host, $this->host)
                && !strcmp($this->connected_port, $port)
                && !strcmp($this->selected_database_file, $database_file)
                && ($this->opened_persistent == $this->options['persistent']))
            {
                return MDB_OK;
            }
            @ibase_close($this->connection);
            $this->affected_rows = -1;
            $this->connection = 0;
        }
        $connection = $this->_doConnect($database_file, $this->options['persistent']);
        if (MDB::isError($connection)) {
            return $connection;
        }
        $this->connection = $connection;
        if ($this->dbsyntax == 'fbird') {
            $this->supported['limit'] = 'alter';
        }
        if (!$this->auto_commit && MDB::isError($trans_result = $this->_doQuery('BEGIN'))) {
            @ibase_close($this->connection);
            $this->connection = 0;
            $this->affected_rows = -1;
            return $trans_result;
        }
        $this->connected_host = $this->host;
        $this->connected_port = $port;
        $this->selected_database_file = $database_file;
        $this->opened_persistent = $this->options['persistent'];
        return MDB_OK;
    }
function connect ( ) { $ port = ( isset ( $ this -> options [ 'port' ] ) ? $ this -> options [ 'port' ] : '' ) ; $ database_file = $ this -> getDatabaseFile ( $ this -> database_name ) ; if ( $ this -> connection != 0 ) { if ( ! strcmp ( $ this -> connected_host , $ this -> host ) && ! strcmp ( $ this -> connected_port , $ port ) && ! strcmp ( $ this -> selected_database_file , $ database_file ) && ( $ this -> opened_persistent == $ this -> options [ 'persistent' ] ) ) { return MDB_OK ; } @ ibase_close ( $ this -> connection ) ; $ this -> affected_rows = - 1 ; $ this -> connection = 0 ; } $ connection = $ this -> _doConnect ( $ database_file , $ this -> options [ 'persistent' ] ) ; if ( MDB :: isError ( $ connection ) ) { return $ connection ; } $ this -> connection = $ connection ; if ( $ this -> dbsyntax == 'fbird' ) { $ this -> supported [ 'limit' ] = 'alter' ; } if ( ! $ this -> auto_commit && MDB :: isError ( $ trans_result = $ this -> _doQuery ( 'BEGIN' ) ) ) { @ ibase_close ( $ this -> connection ) ; $ this -> connection = 0 ; $ this -> affected_rows = - 1 ; return $ trans_result ; } $ this -> connected_host = $ this -> host ; $ this -> connected_port = $ port ; $ this -> selected_database_file = $ database_file ; $ this -> opened_persistent = $ this -> options [ 'persistent' ] ; return MDB_OK ; }
Connect to the database
 @return TRUE on success, MDB_Error on failure
 @access public
Connect to the database @return TRUE on success MDB_Error on failure @access public
//the if below was added after PEAR::DB. Review me!!