Skip to content

Commit

Permalink
修正orderField方法
Browse files Browse the repository at this point in the history
  • Loading branch information
liu21st committed Jul 19, 2021
1 parent 008b991 commit fed6308
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/db/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -969,8 +969,8 @@ protected function parseOrderField(Query $query, string $key, array $val): strin
$sort = in_array($sort, ['ASC', 'DESC'], true) ? ' ' . $sort : '';
$bind = $query->getFieldsBindType();

foreach ($val as $item) {
$val[] = $this->parseDataBind($query, $key, $item, $bind);
foreach ($val as $k => $item) {
$val[$k] = $this->parseDataBind($query, $key, $item, $bind);
}

return 'field(' . $this->parseKey($query, $key, true) . ',' . implode(',', $val) . ')' . $sort;
Expand Down

0 comments on commit fed6308

Please sign in to comment.