Update PDO
This commit is contained in:
parent
a4ddbeb04a
commit
a1c87b45ff
1 changed files with 2 additions and 2 deletions
|
|
@ -19,7 +19,7 @@ $db_name = 'defaultdb';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Open a secure database link using the fast, modern PHP Data Objects (PDO) framework
|
// Open a secure database link using the fast, modern PHP Data Objects (PDO) framework
|
||||||
$pdo = new PDO(
|
$pdo = new PDO(
|
||||||
"mysql:host=$db_host;port=$db_port;dbname=$db_name;charset=utf8mb4",
|
"mysql:host=$db_host;port=$db_port;dbname=$db_name;charset=utf8mb4",
|
||||||
$db_user,
|
$db_user,
|
||||||
$db_pass,
|
$db_pass,
|
||||||
|
|
@ -27,7 +27,7 @@ try {
|
||||||
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
||||||
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
||||||
PDO::ATTR_EMULATE_PREPARES => false,
|
PDO::ATTR_EMULATE_PREPARES => false,
|
||||||
PDO::MYSQL_ATTR_SSL_CA => true, // Required for Aiven Cloud Database
|
PDO::MYSQL_ATTR_SSL_CA => true, // Encapsulated correctly inside the array
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} catch (PDOException $e) {
|
} catch (PDOException $e) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue