public function fetchColumn(string $sql, array $params = [])
    {
        $stmt = $this->prepare($sql, $params);
        $result = $stmt->fetchAll(\PDO::FETCH_COLUMN);

        $this->ok();
        return $result;
    }
public function fetchColumn(string $sql, array $params = [])
    {
        $stmt = $this->prepare($sql, $params);
        $result = $stmt->fetchAll(\PDO::FETCH_COLUMN);

        $this->ok();
        return $result;
    }
public function fetchColumn ( string $ sql , array $ params = [ ] ) { $ stmt = $ this -> prepare ( $ sql , $ params ) ; $ result = $ stmt -> fetchAll ( \ PDO :: FETCH_COLUMN ) ; $ this -> ok ( ) ; return $ result ; }
Returns an array containing one column from the result set rows

@param  string $sql    SQL query with placeholders
"SELECT id FROM users WHERE ip = :ip"
@param  array  $params params for query placeholders (optional)
array (':ip' => '127.0.0.1')

@return array|false
@throws DbException
Returns an array containing one column from the result set rows