/[sql-web-session]/index.cgi
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /index.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 20 by dpavlin, Sat Apr 18 14:05:13 2009 UTC revision 21 by dpavlin, Sat Apr 18 14:08:52 2009 UTC
# Line 9  use DBI; Line 9  use DBI;
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';
# Line 63  if ( my $group_by = param('lookup_col') Line 65  if ( my $group_by = param('lookup_col')
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;
# Line 74  if ( my $group_by = param('lookup_col') Line 76  if ( my $group_by = param('lookup_col')
76          exit;          exit;
77  }  }
78    
79  print header, q|  print q|
80    
81  <html>  <html>
82  <head>  <head>

Legend:
Removed from v.20  
changed lines
  Added in v.21

  ViewVC Help
Powered by ViewVC 1.1.26