powerhouse has asked for the wisdom of the Perl Monks concerning the following question:
### connect to database on every entry to program use DBI; $driver = "mysql"; # Set somewhere else, just including it here $drh = DBI->install_driver( $driver ); $dbh = $drh->connect( $workspace,$userid,$password ); $rv = $drh->err; $str = $drh->errstr; if ($drh->err != 0) { $errormsg="Cannot connect to database"; &printerr; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl Script connecting to DBD::MySql problem
by rnahi (Curate) on Dec 31, 2005 at 11:27 UTC | |
|
Re: Perl Script connecting to DBD::MySql problem
by wfsp (Abbot) on Dec 31, 2005 at 11:38 UTC |