develooper Front page | perl.dbi.users | Postings from February 2008

Get current database name of db handle

From:
Kostas Chatzikokolakis
Date:
February 3, 2008 17:03
Subject:
Get current database name of db handle
Hello,

I am using a dbi handle shared among many packages in my code. Some
package might do a "USE db-name" and change the database. Is it possible
to get the current database name of a dbi handle, either through DBI or
the DBD:mysql driver? In mysql I could do a "SELECT DATABASE()" query,
but I would prefer not to send a query to the server for efficiency.

Thanks in advance,
Kostas



Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About