Skip to content

Instantly share code, notes, and snippets.

@roolo
Created May 25, 2012 14:44
Show Gist options
  • Select an option

  • Save roolo/2788499 to your computer and use it in GitHub Desktop.

Select an option

Save roolo/2788499 to your computer and use it in GitHub Desktop.
Old times :)
<?php
$a = new PDO('pgsql:host=localhost;dbname=travis_development', 'mailo', 'password');
$sth = $a->prepare("SELECT * FROM artifacts");
$sth->execute();
$data = $sth->fetchAll(PDO::FETCH_ASSOC);
var_dump($data);
var_dump($a->errorInfo());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment