Doctrine\DBAL\Statement::fetchColumn PHP Method

fetchColumn() public method

Returns a single column from the next row of a result set.
public fetchColumn ( integer $columnIndex ) : mixed
$columnIndex integer
return mixed A single column from the next row of a result set or FALSE if there are no more rows.
    public function fetchColumn($columnIndex = 0)
    {
        return $this->stmt->fetchColumn($columnIndex);
    }

Usage Example

 /**
  * @param int $columnIndex
  * @return mixed
  */
 public function fetchColumn($columnIndex = 0)
 {
     return $this->stmt->fetchColumn($columnIndex);
 }