Fix from e719ff5 moved to yii\sphinx\Query

This commit is contained in:
Paul Klimov
2014-12-23 18:39:52 +02:00
parent e719ff5854
commit 5ad6ba5c9e
4 changed files with 31 additions and 4 deletions

View File

@ -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();