Created
September 6, 2014 18:58
-
-
Save ryo-utsunomiya/f5613d81918901bd196b to your computer and use it in GitHub Desktop.
PhalconのDbAdapterにchareset=utf8を渡す(MySQL) ref: http://qiita.com/ryo511/items/b6fcbca8fd4287a13043
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$con = new PDO('mysql:host=localhost;dbname=test;charset=utf8', 'dbuser', 'password'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$db = new Phalcon\Db\Adapter\Pdo\Mysql([ | |
'dsn' => 'mysql:host=localhost;dbname=test;charset=utf8', | |
'username' => 'dbuser', | |
'password' => 'password', | |
]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$db = new Phalcon\Db\Adapter\Pdo\Mysql([ | |
'host' => 'localhost', | |
'username' => 'dbuser', | |
'password' => 'password', | |
'dbname' => 'test', | |
'charset' => 'utf8', | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment