MySQL & Perl, 便利之合(八)

2010-12-30 20:32:46 · 作者: · 浏览: 8844
;";
print "<br>";


} else {

# DB Connect

$dbh = DBI->connect("DBI:mysql:lf","doe",'');


# Search

$sth = $dbh->prepare("
select *
from trissue
");

$sth->execute;


# Display result


print <<SUITE;

<center>
<TABLE BORDER=>
<tr bgcolor=#A1C4EE>
<th width=60 align=CENTER><font color=#000000> Num </font></th>
<th width=110 align=CENTER><font color=#000000> Category </font></th>
<th width=110 align=CENTER><font color=#000000> Title </font></th>
<th width=110 align=CENTER><font color=#000000> Author </font></th>
<th width=110 align=CENTER><font color=#000000> En </font></th>
<th width=110 align=CENTER><font color=#000000> Es </font></th>
<th width=110 align=CENTER><font color=#000000> Fr </font></th>
<th width=110 align=CENTER><font color=#000000> De </font></th>
<th width=110 align=CENTER><font color=#000000&g