Doctrine\DBAL\Connection::fetchColumn
Prepares and executes an SQL query and returns the value of a single column of the first row of the result.
Signature
public function fetchColumn(string
$statement,
[array
$params = 0,
[integer
$colnum = 0]] )
Parameters
$statement
— string- sql query to be executed
$params
— array- prepared statement params
$colnum
— integer- 0-indexed column number to retrieve
Returns
- mixed