Welcome Guest, Not a member yet? Register   Sign In
CI3 - How to refer to PDO subdrivers from database.php config?
#2

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';
$db['local_windows_pdo']['hostname'] = 'sqlsrv:server=(local)\MSSQLSERVER2012;Database=' . $db['local_windows_pdo']['database'];
$db['local_windows_pdo']['dbdriver'] = 'pdo';
Reply


Messages In This Thread
RE: CI3 - How to refer to PDO subdrivers from database.php config? - by elijahlofgren - 04-28-2015, 05:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB