Skip to content

Commit 0d7fe2f

Browse files
committed
Merge pull request #47 from rjd22/3.3/bugfix/more_info_on_docs_for_charset_pdo
3.3/bugfix/more info on docs for charset pdo
2 parents b93a4cf + 8184401 commit 0d7fe2f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

guide/database/config.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,21 @@ CONNECTION_ARRAY
2525
TABLE_PREFIX
2626
: Prefix that will be added to all table names by the [query builder](#query_building).
2727

28+
CHARACTER_SET
29+
: The character set to use for the connection with the database.
30+
31+
[!!] Setting Character Set won't work for PDO based connections because of incompatibility with PHP prior to 5.3.6. Use the DSN or options config instead. Example Below:
32+
33+
return array
34+
(
35+
'default' => array
36+
(
37+
'type' => 'PDO',
38+
'connection' => array(
39+
'options' => array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"),
40+
),
41+
),
42+
);
2843

2944
## Example
3045

0 commit comments

Comments
 (0)