queryScalar() public method
Executes the SQL statement and returns the value of the first column in the first row of data.
This method is best used when only a single value is needed for a query.
public string|null|false queryScalar ( ) | ||
---|---|---|
return | string|null|false |
The value of the first column in the first row of the query result. False is returned if there is no value. |
throws | yii\db\Exception |
execution failed |
Please login to continue.