in reply to DBD::mysql connections
And check the DBI docs for the ping() method.sub getNullEndIds{ my $self = shift; my $dbh = shift; $dbh = DBI->connect($dbi,"monster_mirror","m1rr0r",{'RaiseError' = +> 1}) unless $dbh->ping; # rest of method # don't close the dbh at the end of this method }
Actually I'd wrap the DBI->connect call in a seperate sub, so you don't have to put your connection info all over the place.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBD::mysql connections
by seaver (Pilgrim) on Jun 17, 2004 at 15:25 UTC | |
by shemp (Deacon) on Jun 17, 2004 at 16:30 UTC | |
by seaver (Pilgrim) on Jun 17, 2004 at 18:11 UTC |