Think/Db/Driver.php
protected function parseOrder($order)
    {
        if (is_array($order)) {
            $array = [];
            foreach ($order as $key => $val) {
                if (is_numeric($key)) {
                    $array[] = $this->parseKey($val);
                } else {
                    $array[] = $this->parseKey($key).' '.$val;
                }
            }
            $order = implode(',', $array);
        }

        return !empty($order) ? ' ORDER BY '.$order : '';
    }
protected function parseOrder($order)
    {
        if (is_array($order)) {
            $array = [];
            foreach ($order as $key => $val) {
                if (is_numeric($key)) {
                    $array[] = $this->parseKey($val);
                } else {
                    $array[] = $this->parseKey($key).' '.$val;
                }
            }
            $order = implode(',', $array);
        }

        return !empty($order) ? ' ORDER BY '.$order : '';
    }
order分析


@param mixed $order

@return string