User Tools

Site Tools


kurs:dbd--postgres

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision Both sides next revision
kurs:dbd--postgres [2010/02/02 13:00]
mh created
kurs:dbd--postgres [2010/05/18 11:15]
127.0.0.1 external edit
Line 1: Line 1:
 +<​code>​
 +use strict;
 +use warnings;
  
 +use DBI;
 +
 +my $dbh = DBI->​connect("​dbi:​Pg:​dbname=dumpdb",​ '​mh',​ '​mh',​ {AutoCommit => 0});
 +
 +my $sth = $dbh->​prepare('​select * from bla');
 +
 +$sth->​execute();​
 +
 +while (my @r = $sth->​fetchrow) {
 +  print "​@r\n";​
 +}
 +
 +$sth->​finish;​
 +$dbh->​disconnect;​
 +</​code>​
kurs/dbd--postgres.txt ยท Last modified: 2014/09/10 21:22 (external edit)