db\Command queryOne()

queryOne() public method

Executes the SQL statement and returns the first row of the result.

This method is best used when only the first row of result is needed for a query.

public array|false queryOne ( $fetchMode = null )
$fetchMode integer

The result fetch mode. Please refer to PHP manual for valid fetch modes. If this parameter is null, the value set in $fetchMode will be used.

return array|false

The first row (in terms of an array) of the query result. False is returned if the query results in nothing.

throws yii\db\Exception

execution failed

doc_Yii
2016-10-30 16:57:30
Comments
Leave a Comment

Please login to continue.