summaryrefslogtreecommitdiff
path: root/README.markdown
diff options
context:
space:
mode:
authorJamie Matthews <[email protected]>2010-07-05 21:04:16 +0100
committerJamie Matthews <[email protected]>2010-07-05 21:04:16 +0100
commit6547b15aee997fb0db43c7fc0b1f33110993e215 (patch)
tree576deb56d5ac468accb1560d1506593e0d89db15 /README.markdown
parent5233962fcc0f84cedb9baa2d633ed0231dbd4ff3 (diff)
Add 'driver_options' setting to allow driver-specific connection options to be passed through to the PDO constructor. Closes #2
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown9
1 files changed, 9 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown
index 57c0464..15b5a14 100644
--- a/README.markdown
+++ b/README.markdown
@@ -200,6 +200,15 @@ Some database adapters (such as MySQL) require a username and password to be sup
ORM::configure('username', 'database_user');
ORM::configure('password', 'top_secret');
+#### PDO Driver Options ####
+
+Setting: `driver_options`
+
+Some database adapters require (or allow) an array of driver-specific configuration options. This setting allows you to pass these options through to the PDO constructor. For more information, see [the PDO documentation](http://www.php.net/manual/en/pdo.construct.php). For example, to force the MySQL driver to use UTF-8 for the connection:
+
+ ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));
+
+
#### PDO Error Mode ####
Setting: `error_mode`