diff options
author | Jamie Matthews <[email protected]> | 2010-07-05 21:04:16 +0100 |
---|---|---|
committer | Jamie Matthews <[email protected]> | 2010-07-05 21:04:16 +0100 |
commit | 6547b15aee997fb0db43c7fc0b1f33110993e215 (patch) | |
tree | 576deb56d5ac468accb1560d1506593e0d89db15 /idiorm.php | |
parent | 5233962fcc0f84cedb9baa2d633ed0231dbd4ff3 (diff) |
Add 'driver_options' setting to allow driver-specific connection options to be passed through to the PDO constructor. Closes #2
Diffstat (limited to 'idiorm.php')
-rw-r--r-- | idiorm.php | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -84,6 +84,7 @@ 'error_mode' => PDO::ERRMODE_EXCEPTION, 'username' => null, 'password' => null, + 'driver_options' => null, ); // Database connection, instance of the PDO class @@ -182,7 +183,8 @@ $connection_string = self::$config['connection_string']; $username = self::$config['username']; $password = self::$config['password']; - self::$db = new PDO($connection_string, $username, $password); + $driver_options = self::$config['driver_options']; + self::$db = new PDO($connection_string, $username, $password, $driver_options); self::$db->setAttribute(PDO::ATTR_ERRMODE, self::$config['error_mode']); } } |