src/Service/DB/Select.php
protected function compileWhere()
    {
        if (!$this->where) {
            return ['', []];
        }

        $where = $params = [];

        foreach ($this->where as $w) {
            list($where_sql, $where_params) = $w;

            $where[] = $where_sql;
            if ($where_params) {
                $params = array_merge($params, $where_params);
            }
        }
        $where = '(' . implode(') AND (', $where) . ')';

        return [$where, $params];
    }
protected function compileWhere()
    {
        if (!$this->where) {
            return ['', []];
        }

        $where = $params = [];

        foreach ($this->where as $w) {
            list($where_sql, $where_params) = $w;

            $where[] = $where_sql;
            if ($where_params) {
                $params = array_merge($params, $where_params);
            }
        }
        $where = '(' . implode(') AND (', $where) . ')';

        return [$where, $params];
    }
把查询条件参数编译为where子句.

@return
array(
(string),    // where 子句
(array),     // 查询参数
)