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; |
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">|; |