in reply to Disconnecting from a Database
my $dbh = DBI->connect("DBI:mysql:fenonn:localhost","fenonn","password +"); my $sth = $dbh->prepare("SELECT data1 FROM table1"); $sth->execute() || die "Couldn't execute statement: DBI::errstr; stopp +ed"; my ( $data ) = $sth->fetchrow_array(); $dbh->disconnect; print $data;
|
|---|