redis\ActiveQuery one()

one() public method

Executes the query and returns a single row of result.

public yii\redis\ActiveRecord|array|null one ( $db = null )
$db yii\redis\Connection

The database connection used to execute the query. If this parameter is not given, the db application component will be used.

return yii\redis\ActiveRecord|array|null

A single row of query result. Depending on the setting of asArray(), the query result may be either an array or an ActiveRecord object. Null will be returned if the query results in nothing.

doc_Yii
2016-10-30 17:10:38
Comments
Leave a Comment

Please login to continue.