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);
    }