/[informatika.old]/dump.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /dump.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Wed Apr 12 08:11:45 2000 UTC (23 years, 11 months ago) by dpavlin
Branch: MAIN
File MIME type: text/plain
.

1 #!/usr/local/bin/perl -w
2
3 use DBI;
4
5 die "SQL query as argument?" if (!defined($ARGV[0]));
6
7 my $mydbh = DBI->connect("DBI:Pg:dbname=informatika","","") || die $DBI::errstr;
8 $mysth = $mydbh->prepare("$ARGV[0]") || die $mydbh->errstr();
9 $mysth->execute() || die $mysth->errstr();
10
11 print "#",join("\t",@{ $mysth->{NAME} }),"\n";
12 while (@myarr = $mysth->fetchrow_array() ) {
13 print join("\t",@myarr),"\n";
14 }

  ViewVC Help
Powered by ViewVC 1.1.26