#!/usr/bin/perl
print "Content-type: text/html\n\n";
use DBI; $dbh=DBI->connect("dbi:Oracle:demo", "lb1", "libing71") or die "Can't connect: $DBI::errstr\n";
print "<html><body><h1>Customer table</h1>";
$sth=$dbh->prepare("SELECT firstname, address FROM df1.customer"); $sth->execute();
print "<table>\n";
print "<tr><th>Customer Name </th><th>Customer Address</th></tr>\n";
while ( @row = $sth->fetchrow_array)
{
print "<tr>";
foreach (@row)
{
print "<td>$_</td>";
}
print "</tr>\n" }
print "</table>\n";
print "</body></html>";
$sth->finish;
$dbh->disconnect;
_________________________________________________________________
免费下载 MSN Explorer: http://explorer.msn.com/lccn/
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>