public scalar ( string $field, |
||
$field | string | name of the attribute to select |
$db | the database connection used to execute the query. If this parameter is not given, the `elasticsearch` application component will be used. | |
return | string | the value of the specified attribute in the first record of the query result. Null is returned if the query result is empty or the field does not exist. |