修正Query类parseOrder方法一处错误

This commit is contained in:
thinkphp
2016-10-07 11:28:30 +08:00
parent fb3170bcfc
commit 7af500de84

View File

@@ -452,9 +452,10 @@ abstract class Builder
* order分析 * order分析
* @access protected * @access protected
* @param mixed $order * @param mixed $order
* @param array $options 查询条件
* @return string * @return string
*/ */
protected function parseOrder($order) protected function parseOrder($order, $options = [])
{ {
if (is_array($order)) { if (is_array($order)) {
$array = []; $array = [];
@@ -590,7 +591,7 @@ abstract class Builder
$this->parseWhere($options['where'], $options), $this->parseWhere($options['where'], $options),
$this->parseGroup($options['group']), $this->parseGroup($options['group']),
$this->parseHaving($options['having']), $this->parseHaving($options['having']),
$this->parseOrder($options['order']), $this->parseOrder($options['order'], $options),
$this->parseLimit($options['limit']), $this->parseLimit($options['limit']),
$this->parseUnion($options['union']), $this->parseUnion($options['union']),
$this->parseLock($options['lock']), $this->parseLock($options['lock']),
@@ -721,7 +722,7 @@ abstract class Builder
implode(',', $set), implode(',', $set),
$this->parseJoin($options['join'], $options), $this->parseJoin($options['join'], $options),
$this->parseWhere($options['where'], $options), $this->parseWhere($options['where'], $options),
$this->parseOrder($options['order']), $this->parseOrder($options['order'], $options),
$this->parseLimit($options['limit']), $this->parseLimit($options['limit']),
$this->parseLock($options['lock']), $this->parseLock($options['lock']),
$this->parseComment($options['comment']), $this->parseComment($options['comment']),
@@ -745,7 +746,7 @@ abstract class Builder
!empty($options['using']) ? ' USING ' . $this->parseTable($options['using'], $options) . ' ' : '', !empty($options['using']) ? ' USING ' . $this->parseTable($options['using'], $options) . ' ' : '',
$this->parseJoin($options['join'], $options), $this->parseJoin($options['join'], $options),
$this->parseWhere($options['where'], $options), $this->parseWhere($options['where'], $options),
$this->parseOrder($options['order']), $this->parseOrder($options['order'], $options),
$this->parseLimit($options['limit']), $this->parseLimit($options['limit']),
$this->parseLock($options['lock']), $this->parseLock($options['lock']),
$this->parseComment($options['comment']), $this->parseComment($options['comment']),