-
-
Save anonymous/3dace43a4ee7fd8e2fd20a6692d0294e to your computer and use it in GitHub Desktop.
This file contains 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
// connect to database | |
$pdo = new PDO( | |
'mysql:host=' . $config->Db['host'] . ';dbname=' . $config->Db['databaseName'] . ';charset=utf8mb4', | |
$config->Db['username'], | |
$config->Db['password'], | |
// deactivate old prepare emulation in MySQL and throw exceptions | |
array(PDO::ATTR_EMULATE_PREPARES => false, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment