one() public method
Executes query and returns a single row of result.
public yii\sphinx\ActiveRecord|array|null one ( $db = null ) | ||
---|---|---|
$db | yii\sphinx\Connection |
The DB connection used to create the DB command. If null, the DB connection returned by $modelClass will be used. |
return | yii\sphinx\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. |
Please login to continue.