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

What if the sql statement is wrong, than it also fails! Is there a difference between both ? Luca
  • Comment on Re^4: how to test a connection with mysql db

Replies are listed 'Best First'.
Re^5: how to test a connection with mysql db
by wazoox (Prior) on Jul 22, 2005 at 09:34 UTC
    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
        It opens an new connection, it should be completely harmless. If you really want to get sure that the connection's still alive, use $dbh->ping, before trying to connect.