Commit 411dc71b by Koudy

Fixed getting the count for queries with the union

parent d79febfd
......@@ -359,7 +359,7 @@ class Query extends Component implements QueryInterface
$this->limit = $limit;
$this->offset = $offset;
if (empty($this->groupBy) && !$this->distinct) {
if (empty($this->groupBy) && empty($this->union) && !$this->distinct) {
return $command->queryScalar();
} else {
return (new Query)->select([$selectExpression])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment