src/Connection.php
public function column(string $sql, array $params = [])
    {
        $prepared = $this->prepare($sql, $params);
        $this->execute($prepared);
        $result = $prepared['statement']->fetchColumn();
        $prepared['statement']->closeCursor();
        return $result;
    }
public function column(string $sql, array $params = [])
    {
        $prepared = $this->prepare($sql, $params);
        $this->execute($prepared);
        $result = $prepared['statement']->fetchColumn();
        $prepared['statement']->closeCursor();
        return $result;
    }
public function column ( string $ sql , array $ params = [ ] ) { $ prepared = $ this -> prepare ( $ sql , $ params ) ; $ this -> execute ( $ prepared ) ; $ result = $ prepared [ 'statement' ] -> fetchColumn ( ) ; $ prepared [ 'statement' ] -> closeCursor ( ) ; return $ result ; }
Execute a query and fetch the first column

@param   string $sql SQL Query
@param   array $params (optional) Query params

@return  mixed
Execute a query and fetch the first column