src/db/BuildSql.php
public function connect($id = 0)
    {
        $this->id   = $id;
        $this->link = self::$do[md5(json_encode(self::$dbConfig[$id]))];

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

        $this->config              = self::$dbConfig[$id];
        $this->tablepre            = $this->config['prefix'];
        $this->options['tablepre'] = $this->config['prefix'];
        $this->options['database'] = $this->config['name'];

        return $this;
    }
public function connect($id = 0)
    {
        $this->id   = $id;
        $this->link = self::$do[md5(json_encode(self::$dbConfig[$id]))];

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

        $this->config              = self::$dbConfig[$id];
        $this->tablepre            = $this->config['prefix'];
        $this->options['tablepre'] = $this->config['prefix'];
        $this->options['database'] = $this->config['name'];

        return $this;
    }
链接