src/db/BuildSql.php
public function join($table, $where = '', $float = 'left')
    {

        if ($table == $this->options['table']['name']) {
            throw new Exception('表与关联表名字相同');
        }

        $where ?: $where = $this->options['table']['name'] . '.id = ' . $table . '.id';

        $this->options['join'] = ['table' => $table, 'where' => $where, 'float' => $float];

        if (!isset($this->bulid['join'])) {
            $this->bulid['join'] = ' ' . $float . ' JOIN ' . $table . ' ON ' . $where;
        } else {
            $this->bulid['join'] .= ' ' . $float . ' JOIN ' . $table . ' ON ' . $where;
        }

        return $this;
    }
public function join($table, $where = '', $float = 'left')
    {

        if ($table == $this->options['table']['name']) {
            throw new Exception('表与关联表名字相同');
        }

        $where ?: $where = $this->options['table']['name'] . '.id = ' . $table . '.id';

        $this->options['join'] = ['table' => $table, 'where' => $where, 'float' => $float];

        if (!isset($this->bulid['join'])) {
            $this->bulid['join'] = ' ' . $float . ' JOIN ' . $table . ' ON ' . $where;
        } else {
            $this->bulid['join'] .= ' ' . $float . ' JOIN ' . $table . ' ON ' . $where;
        }

        return $this;
    }
关联查询
@date   2018-07-12T11:12:45+0800
@author ChenMingjiang
@param  [type]                   $table   [description]
@param  string                   $where   [description]
@param  string                   $float   [description]
@param  array                    $options [description]
@return [type]                            [description]