Paul DuBois [EMAIL PROTECTED] wrote:
> At 7:20 PM +0100 9/19/03, Adam Gent wrote:
> >Hi All,
> >
> >I am using mySQL and need away to tell if a connection is open.
> >
> >I am aware that there is the Active command, within the DBI but this does
> >not appear to be supported in DBD::mysql
> >
> >Is there any other way to tell if the connection is still open.
>
> Invoke its ping() method.
Just to expand on what Paul said, read the perldocs:
perldoc DBI
at a command prompt. Here is some of it:
$rc = $dbh->ping;
Attempts to determine, in a reasonably efficient way, if the
database server is still running and the connection to it is still
working. Individual drivers should implement this function in the
most suitable manner for their database engine.
You should also read about "connect_cached" - may help you.
--
Hardy Merrill
Red Hat, Inc.