diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 4cea36ea..64f449c9 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -2601,7 +2601,7 @@ class Query $resultSet = $this->options($options) ->limit($count) ->bind($bind) - ->where($column, 'asc' == $order ? '>' : '<', $lastId) + ->where($column, 'asc' == strtolower($order) ? '>' : '<', $lastId) ->order($column, $order) ->select(); if ($resultSet instanceof Collection) {