in reply to Re^2: how to test a connection with mysql db
in thread how to test a connection with mysql db

You shouldn't have to worry that much about the connection; simply test the return value of each DBI statement, if it fails, then it MAY be because the connection's lost.
$dbh->something() or .... # put your error management code here

Replies are listed 'Best First'.
Re^4: how to test a connection with mysql db
by Anonymous Monk on Jul 22, 2005 at 07:42 UTC
    What if the sql statement is wrong, than it also fails! Is there a difference between both ? Luca
      The error message is different, yes. But it will also vary from a sgbd to another, or from a version to another. You can't really help there.
        What is exactly the consequence of connecting a perl object to a mysql database, while it is already connected ?

        Luca