fenonn has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; use DBI; my $dbh = DBI->connect("DBI:mysql:fenonn:localhost","fenonn","password +"); $dbh->disconnect; my $sth = $dbh->prepare("SELECT data1 FROM table1"); $sth->execute() || die "Couldn't execute statement: $DBI::errstr; stop +ped"; my ( $data ) = $sth->fetchrow_array(); print $data;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Disconnecting from a Database
by tadman (Prior) on Oct 13, 2001 at 00:35 UTC | |
|
Re: Disconnecting from a Database
by CubicSpline (Friar) on Oct 13, 2001 at 00:34 UTC | |
|
Re: Disconnecting from a Database
by Stegalex (Chaplain) on Oct 13, 2001 at 19:06 UTC | |
|
Re: Disconnecting from a Database
by Indomitus (Scribe) on Oct 13, 2001 at 21:41 UTC | |
|
Re: Disconnecting from a Database
by perrin (Chancellor) on Oct 13, 2001 at 00:59 UTC | |
|
Re: Disconnecting from a Database
by graq (Curate) on Oct 16, 2001 at 15:31 UTC |