mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-01 20:19:42 +08:00
Fix from e719ff5 moved to yii\sphinx\Query
This commit is contained in:
@ -354,7 +354,7 @@ class Query extends Component implements QueryInterface
|
||||
* @param Connection|null $db
|
||||
* @return bool|string
|
||||
*/
|
||||
private function queryScalar($selectExpression, $db)
|
||||
protected function queryScalar($selectExpression, $db)
|
||||
{
|
||||
$select = $this->select;
|
||||
$limit = $this->limit;
|
||||
@ -372,7 +372,7 @@ class Query extends Component implements QueryInterface
|
||||
if (empty($this->groupBy) && empty($this->union) && !$this->distinct) {
|
||||
return $command->queryScalar();
|
||||
} else {
|
||||
return (new static)->select([$selectExpression])
|
||||
return (new Query)->select([$selectExpression])
|
||||
->from(['c' => $this])
|
||||
->createCommand($command->db)
|
||||
->queryScalar();
|
||||
|
||||
Reference in New Issue
Block a user