Parent Directory | Revision Log
.
1 | dpavlin | 1.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 |