/[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 13 by dpavlin, Wed Apr 15 15:26:38 2009 UTC revision 15 by dpavlin, Wed Apr 15 18:42:41 2009 UTC
# Line 37  if ( my $group_by = param('add_group_by' Line 37  if ( my $group_by = param('add_group_by'
37          while ( my @row = $sth->fetchrow_array ) {          while ( my @row = $sth->fetchrow_array ) {
38                  my ( $n, $c ) = @row;                  my ( $n, $c ) = @row;
39                  $n = 'NULL' unless defined $n;                  $n = 'NULL' unless defined $n;
40                  print qq|<tr><td>$c</td><td>$n</td></tr>|;                  print qq|<tr><td>$c</td><td><a href="#">$n</a></td></tr>|;
41          }          }
42          print qq|</table>|;          print qq|</table>|;
43          exit;          exit;
# Line 106  $t = time() - $t; Line 106  $t = time() - $t;
106    
107  print $sth->rows, qq| rows in $t s</code>|;  print $sth->rows, qq| rows in $t s</code>|;
108    
109    #my @types = map { scalar $dbh->type_info($_)->{TYPE_NAME} } @{ $sth->{TYPE} };
110    my $types = dump( $sth->{TYPE} );
111    print qq{
112    <script type="text/javascript">
113    var column_type = $types ;
114    </script>
115    };
116    
117  @columns = @{ $sth->{NAME} } if $#columns == 0 && $columns[0] eq '*';  @columns = @{ $sth->{NAME} } if $#columns == 0 && $columns[0] eq '*';
118    
119  print qq|<table id="results">|;  print qq|<table id="results">|;

Legend:
Removed from v.13  
changed lines
  Added in v.15

  ViewVC Help
Powered by ViewVC 1.1.26