Skip to content

Commit 412a157

Browse files
committed
改进order方法
1 parent 866518b commit 412a157

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/db/BaseQuery.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,7 @@ public function order(string | array | Raw $field, string $order = '')
807807

808808
$type = $this->getFieldType($alias);
809809
if (is_null($type)) {
810+
$this->hasWhere($alias);
810811
$field = $alias . '.' . $attr;
811812
}
812813
}

0 commit comments

Comments
 (0)