irm-1.6-b3/MDB/ibase.php
/**
     * Does the grunt work of connecting to the database
     *
     * @return mixed connection resource on success, MDB_Error on failure
     * @access private
     **/
Does the grunt work of connecting to the database
@return mixed connection resource on success, MDB_Error on failure
@access private
Does the grunt work of connecting to the database @return mixed connection resource on success MDB_Error on failure @access private
function _doConnect($database_name, $persistent)
    {
        $function = ($persistent ? 'ibase_pconnect' : 'ibase_connect');
        if (!function_exists($function)) {
            return($this->raiseError(MDB_ERROR_UNSUPPORTED, NULL, NULL,
                'doConnect: FireBird/InterBase support is not available in this PHP configuration'));
        }
        $dbhost = $this->host ?
                  ($this->host . ':' . $database_name) :
                  $database_name;
        $params = array();
        $params[] = $dbhost;
        $params[] = !empty($this->user) ? $this->user : NULL;
        $params[] = !empty($this->password) ? $this->password : NULL;
        $connection = @call_user_func_array($function, $params);
        if ($connection > 0) {
            @ibase_timefmt("%Y-%m-%d %H:%M:%S", IBASE_TIMESTAMP);
            @ibase_timefmt("%Y-%m-%d", IBASE_DATE);
            return $connection;
        }
        if (isset($php_errormsg)) {
            $error_msg = $php_errormsg;
        } else {
            $error_msg = 'Could not connect to FireBird/InterBase server';
        }
        return($this->raiseError(MDB_ERROR_CONNECT_FAILED, NULL, NULL,
            'doConnect: '.$error_msg));
    }
function _doConnect ( $ database_name , $ persistent ) { $ function = ( $ persistent ? 'ibase_pconnect' : 'ibase_connect' ) ; if ( ! function_exists ( $ function ) ) { return ( $ this -> raiseError ( MDB_ERROR_UNSUPPORTED , NULL , NULL , 'doConnect: FireBird/InterBase support is not available in this PHP configuration' ) ) ; } $ dbhost = $ this -> host ? ( $ this -> host . ':' . $ database_name ) : $ database_name ; $ params = array ( ) ; $ params [ ] = $ dbhost ; $ params [ ] = ! empty ( $ this -> user ) ? $ this -> user : NULL ; $ params [ ] = ! empty ( $ this -> password ) ? $ this -> password : NULL ; $ connection = @ call_user_func_array ( $ function , $ params ) ; if ( $ connection > 0 ) { @ ibase_timefmt ( " %Y-%m-%d %H:%M:%S " , IBASE_TIMESTAMP ) ; @ ibase_timefmt ( " %Y-%m-%d " , IBASE_DATE ) ; return $ connection ; } if ( isset ( $ php_errormsg ) ) { $ error_msg = $ php_errormsg ; } else { $ error_msg = 'Could not connect to FireBird/InterBase server' ; } return ( $ this -> raiseError ( MDB_ERROR_CONNECT_FAILED , NULL , NULL , 'doConnect: ' . $ error_msg ) ) ; }
Does the grunt work of connecting to the database
 @return mixed connection resource on success, MDB_Error on failure
 @access private
Does the grunt work of connecting to the database @return mixed connection resource on success MDB_Error on failure @access private