is it possible to query pdo object for database file name ?
Posted: Wed May 05, 2010 5:17 am
in php I declared database object:
i know how to get information about engine used in this connection, which is:
But I do not know how to get back the actual database file name (that is 'mybase.DB3') back from this object. Is it possible to be done from query to the database itself (maybe some kind of PRAGMA) or from query to the object.
Code: Select all
$pdo = new PDO('sqlite:mybase.DB3');Code: Select all
$pdo->getAttribute(PDO::ATTR_DRIVER_NAME); // ---> string 'sqlite'