feat:examples: \PDO::ATTR_EMULATE_PREPARES => false

This commit is contained in:
liujian 2022-05-22 18:13:32 +08:00
parent d06e4fa983
commit 852c8abcb4
5 changed files with 5 additions and 5 deletions

View File

@ -38,7 +38,7 @@ class DB
$password = $_ENV['DATABASE_PASSWORD'];
$db = new Database($dsn, $username, $password, [
\PDO::ATTR_DEFAULT_FETCH_MODE => \PDO::FETCH_ASSOC,
\PDO::ATTR_EMULATE_PREPARES => false
// \PDO::ATTR_EMULATE_PREPARES => false
]);
APP_DEBUG and $db->setLogger(new DBLogger());
self::$instance = $db;

View File

@ -38,7 +38,7 @@ class DB
$password = $_ENV['DATABASE_PASSWORD'];
$db = new Database($dsn, $username, $password, [
\PDO::ATTR_DEFAULT_FETCH_MODE => \PDO::FETCH_ASSOC,
\PDO::ATTR_EMULATE_PREPARES => false
// \PDO::ATTR_EMULATE_PREPARES => false
]);
APP_DEBUG and $db->setLogger(new DBLogger());
self::$instance = $db;

View File

@ -38,7 +38,7 @@ class DB
$password = $_ENV['DATABASE_PASSWORD'];
$db = new Database($dsn, $username, $password, [
\PDO::ATTR_DEFAULT_FETCH_MODE => \PDO::FETCH_ASSOC,
\PDO::ATTR_EMULATE_PREPARES => false
// \PDO::ATTR_EMULATE_PREPARES => false
]);
APP_DEBUG and $db->setLogger(new DBLogger());
self::$instance = $db;

View File

@ -38,7 +38,7 @@ class DB
$password = $_ENV['DATABASE_PASSWORD'];
$db = new Database($dsn, $username, $password, [
\PDO::ATTR_DEFAULT_FETCH_MODE => \PDO::FETCH_ASSOC,
\PDO::ATTR_EMULATE_PREPARES => false
// \PDO::ATTR_EMULATE_PREPARES => false
]);
APP_DEBUG and $db->setLogger(new DBLogger());
self::$instance = $db;

View File

@ -38,7 +38,7 @@ class DB
$password = $_ENV['DATABASE_PASSWORD'];
$db = new Database($dsn, $username, $password, [
\PDO::ATTR_DEFAULT_FETCH_MODE => \PDO::FETCH_ASSOC,
\PDO::ATTR_EMULATE_PREPARES => false
// \PDO::ATTR_EMULATE_PREPARES => false
]);
APP_DEBUG and $db->setLogger(new DBLogger());
self::$instance = $db;