CodeIgniter Forums

Full Version: PDO drivers?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Anyone have a list of the available PDO drivers? Attempted to use 'pdo/mysql' but it gave me the error
Code:
Invalid or non-existent PDO subdriver

 
Thanks! Big Grin
I believe you would set 'dbdriver' to 'pdo' and configure the 'dsn' to a value starting with 'mysql:' (see the user guide for more information on configuration). As far as I can tell, the names of the supported drivers would be '4d', 'cubrid', 'dblib', 'firebird', 'ibm', 'informix', 'mysql', 'oci', 'odbc', 'pgsql', 'sqlite', and 'sqlsrv'. You can double-check by looking in your system directory under database/drivers/pdo/subdrivers/. The files in that directory are named using the format "{driver}_{subdriver}_driver.php" or "{driver}_{subdriver}_forge.php" (each subdriver should have both files). Auto-correct was really pushing to change a lot of those names, so I would definitely recommend double-checking...