Re: PDO how to get connection type ?

From: Date: Sun, 24 Jul 2005 14:14:00 +0000
Subject: Re: PDO how to get connection type ?
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-2655@lists.php.net to get a copy of this message
$db->getAttribute(PDO_ATTR_DRIVER_NAME); Caveat Emptor: when using the ODBC driver, you still have no idea what the underlying database is. (and neither does PDO; the PDO::quote() method doesn't do anything for the ODBC driver currently). --Wez. On 7/24/05, Bertrand Mansion <bmansion@mamasam.com> wrote: > Hi, > > Is there a way to get the connection type (or driver name) from a PDO object ? > > I need this info as I have a class that uses a PDO connection and depending on > the type of the database being used, will perform different SQL queries. > > Thanks, > > Bertrand Mansion > Mamasam > > -- > PECL development discussion Mailing List (http://pecl.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.pecl.dev (#2655) next »