yii\db\Command::queryOne PHP Метод

queryOne() публичный Метод

This method is best used when only the first row of result is needed for a query.
public queryOne ( integer $fetchMode = null ) : array | false
$fetchMode integer the result fetch mode. Please refer to [PHP manual](http://www.php.net/manual/en/function.PDOStatement-setFetchMode.php) for valid fetch modes. If this parameter is null, the value set in [[fetchMode]] will be used.
Результат array | false the first row (in terms of an array) of the query result. False is returned if the query results in nothing.
    public function queryOne($fetchMode = null)
    {
        return $this->queryInternal('fetch', $fetchMode);
    }