src/Mysqli.php
public function join($table, $where = '', $float = 'left')
    {
        if ($table == $this->table) {
            abort('表与关联表名字相同');
        }

        $where ?: $where = $this->table . '.id =' . $table . '.id';

        $this->join .= ' ' . $float . ' JOIN ' . $table . ' ON ' . $where;

        $this->build['join'] = array('table' => $table, 'where' => $where, 'float' => $float);

        return $this;
    }
public function join($table, $where = '', $float = 'left')
    {
        if ($table == $this->table) {
            abort('表与关联表名字相同');
        }

        $where ?: $where = $this->table . '.id =' . $table . '.id';

        $this->join .= ' ' . $float . ' JOIN ' . $table . ' ON ' . $where;

        $this->build['join'] = array('table' => $table, 'where' => $where, 'float' => $float);

        return $this;
    }
关联查询
@date   2017-06-10T22:52:34+0800
@author ChenMingjiang
@param  [type]                   $table [description]
@param  [type]                   $where [description]
@param  string                   $float [description]
@return [type]                          [description]