CI3 - How to refer to PDO subdrivers from database.php config? |
I'm trying to use the pdo_sqlsrv_driver.php that is new in CI3. However, I'm unable to figure out how to refer to the driver by name in database.config
If I try this I get "Invalid DB driver": $db['local_windows_pdo']['dbdriver'] = 'pdo_sqlsrv'; I've looked for documentation but haven't been able to find how to refer to PDO sub drivers. Thank you! - Elijah
I found that in __construct() in pdo_driver.php the subdriver is auto-determined. Thus, all that should be needed to use a PDO subdriver is setting dbdriver to 'pdo', the hostname portion is used to auto-select the appropriate subdriver.
Code: $db['local_windows_pdo']['database'] = 'MY_DB'; |
Welcome Guest, Not a member yet? Register Sign In |