src/Mysqli.php
public function connect($id = '')
    {

        if (empty(Mysqli::$options['dbConfig'][$id]) && $id) {
            throw new Exception('connect:id:' . $id . ' 数据库配置信息不存在');
        }

        $this->linkId   = !$id ? reset(Mysqli::$link) : Mysqli::$link[$id];
        $dbConfig       = !$id ? reset(Mysqli::$options['dbConfig']) : Mysqli::$options['dbConfig'][$id];
        $this->tablepre = $dbConfig['db_prefix'];

        if (!$this->linkId) {
            throw new Exception('链接信息异常');
        }

        $this->build['database'] = $dbConfig['db_name'];
        $this->build['content']  = !$id ? key(Mysqli::$link) : $id;

        return $this;
    }
public function connect($id = '')
    {

        if (empty(Mysqli::$options['dbConfig'][$id]) && $id) {
            throw new Exception('connect:id:' . $id . ' 数据库配置信息不存在');
        }

        $this->linkId   = !$id ? reset(Mysqli::$link) : Mysqli::$link[$id];
        $dbConfig       = !$id ? reset(Mysqli::$options['dbConfig']) : Mysqli::$options['dbConfig'][$id];
        $this->tablepre = $dbConfig['db_prefix'];

        if (!$this->linkId) {
            throw new Exception('链接信息异常');
        }

        $this->build['database'] = $dbConfig['db_name'];
        $this->build['content']  = !$id ? key(Mysqli::$link) : $id;

        return $this;
    }
链接