9 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
10 |
use Time::HiRes qw/time/; |
use Time::HiRes qw/time/; |
11 |
|
|
12 |
|
print qq{Content-type: text/html\r\n\r\n}; |
13 |
|
|
14 |
our $dsn = 'DBI:Pg:dbname=syslog'; |
our $dsn = 'DBI:Pg:dbname=syslog'; |
15 |
our $user = 'dpavlin'; |
our $user = 'dpavlin'; |
16 |
our $table = 'log'; |
our $table = 'log'; |
65 |
my $sth = $dbh->prepare( $sql ); |
my $sth = $dbh->prepare( $sql ); |
66 |
$sth->execute; |
$sth->execute; |
67 |
$t = time() - $t; |
$t = time() - $t; |
68 |
print header, qq|$t<table><tr><th>|, join(qq|</th><th>|, @cols), qq|</th></tr>|; |
print qq|$t<table><tr><th>|, join(qq|</th><th>|, @cols), qq|</th></tr>|; |
69 |
while ( my @row = $sth->fetchrow_array ) { |
while ( my @row = $sth->fetchrow_array ) { |
70 |
my $n = shift @row; |
my $n = shift @row; |
71 |
$n = 'NULL' unless defined $n; |
$n = 'NULL' unless defined $n; |
76 |
exit; |
exit; |
77 |
} |
} |
78 |
|
|
79 |
print header, q| |
print q| |
80 |
|
|
81 |
<html> |
<html> |
82 |
<head> |
<head> |