/[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 14 by dpavlin, Wed Apr 15 15:35:15 2009 UTC revision 17 by dpavlin, Sat Apr 18 12:08:07 2009 UTC
# Line 11  use Time::HiRes qw/time/; Line 11  use Time::HiRes qw/time/;
11    
12  our $dsn    = 'DBI:Pg:dbname=syslog';  our $dsn    = 'DBI:Pg:dbname=syslog';
13  our $user   = 'dpavlin';  our $user   = 'dpavlin';
14    our $table  = 'log';
15    
16  require 'config.pl' if -e 'config.pl';  require 'config.pl' if -e 'config.pl';
17    
18  my $table = param('table') || 'log';  $table  = param('table') || $table;
19  my @columns = param('columns');  my @columns = param('columns');
20  @columns = ('*') unless @columns;  @columns = ('*') unless @columns;
21  my $limit = param('limit') || 1000;  my $limit = param('limit') || 1000;
# Line 37  if ( my $group_by = param('add_group_by' Line 38  if ( my $group_by = param('add_group_by'
38          while ( my @row = $sth->fetchrow_array ) {          while ( my @row = $sth->fetchrow_array ) {
39                  my ( $n, $c ) = @row;                  my ( $n, $c ) = @row;
40                  $n = 'NULL' unless defined $n;                  $n = 'NULL' unless defined $n;
41                  print qq|<tr><td>$c</td><td>$n</td></tr>|;                  print qq|<tr><td>$c</td><td><a href="#">$n</a></td></tr>|;
42          }          }
43          print qq|</table>|;          print qq|</table>|;
44          exit;          exit;

Legend:
Removed from v.14  
changed lines
  Added in v.17

  ViewVC Help
Powered by ViewVC 1.1.26