irm-1.6-b3/MDB/Manager.php
/**
     * Create a new MDB connection object and connect to the specified
     * database
     *
     * @param   mixed   $dbinfo   'data source name', see the MDB::parseDSN
     *                            method for a description of the dsn format.
     *                            Can also be specified as an array of the
     *                            format returned by MDB::parseDSN.
     *                            Finally you can also pass an existing db
     *                            object to be used.
     * @param   mixed   $options  An associative array of option names and
     *                            their values.
     * @return  mixed MDB_OK on success, or a MDB error object
     * @access  public
     * @see     MDB::parseDSN
     */
Create a new MDB connection object and connect to the specified
database

@param   mixed   $dbinfo   'data source name', see the MDB::parseDSN
method for a description of the dsn format.
Can also be specified as an array of the
format returned by MDB::parseDSN.
Finally you can also pass an existing db
object to be used.
@param   mixed   $options  An associative array of option names and
their values.
@return  mixed MDB_OK on success, or a MDB error object
@access  public
@see     MDB::parseDSN
Create a new MDB connection object and connect to the specified database @param mixed $dbinfo ' data source name ' see the MDB :: parseDSN method for a description of the dsn format . Can also be specified as an array of the format returned by MDB :: parseDSN . Finally you can also pass an existing db object to be used . @param mixed $options An associative array of option names and their values . @return mixed MDB_OK on success or a MDB error object @access public @see MDB :: parseDSN
function &connect(&$dbinfo, $options = FALSE)
    {
        if(is_object($this->database) && !MDB::isError($this->database)) {
            $this->disconnect();
        }
        if(is_object($dbinfo)) {
             $this->database =& $dbinfo;
        } else {
            $this->database =& MDB::connect($dbinfo, $options);
            if(MDB::isError($this->database)) {
                return($this->database);
            }
        }
        if(is_array($options)) {
            $this->options = array_merge($options, $this->options);
        }
        return(MDB_OK);
    }
function & connect ( & $ dbinfo , $ options = FALSE ) { if ( is_object ( $ this -> database ) && ! MDB :: isError ( $ this -> database ) ) { $ this -> disconnect ( ) ; } if ( is_object ( $ dbinfo ) ) { $ this -> database = & $ dbinfo ; } else { $ this -> database = & MDB :: connect ( $ dbinfo , $ options ) ; if ( MDB :: isError ( $ this -> database ) ) { return ( $ this -> database ) ; } } if ( is_array ( $ options ) ) { $ this -> options = array_merge ( $ options , $ this -> options ) ; } return ( MDB_OK ) ; }
Create a new MDB connection object and connect to the specified
 database
Create a new MDB connection object and connect to the specified database