scalar() public method
Returns the query result as a scalar value.
The value returned will be the first column in the first row of the query results.
public string|null|false scalar ( $db = null ) | ||
---|---|---|
$db | yii\db\Connection |
The database connection used to generate the SQL statement. If this parameter is not given, the |
return | string|null|false |
The value of the first column in the first row of the query result. False is returned if the query result is empty. |
Please login to continue.