Merge branch 'master' of github.com:m1k1o/blog into sqlite-support
This commit is contained in:
commit
f8056a1dc2
1 changed files with 6 additions and 8 deletions
|
@ -50,7 +50,12 @@ class DB
|
|||
// Username
|
||||
Config::get('mysql_user'),
|
||||
// Password
|
||||
Config::get_safe('mysql_pass', '')
|
||||
Config::get_safe('mysql_pass', ''),
|
||||
// Set attributes
|
||||
[
|
||||
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
|
||||
\PDO::ATTR_EMULATE_PREPARES => false
|
||||
]
|
||||
);
|
||||
|
||||
$this->_PDO->exec(
|
||||
|
@ -63,13 +68,6 @@ class DB
|
|||
} catch (PDOException $e) {
|
||||
throw new DBException($e->getMessage());
|
||||
}
|
||||
|
||||
// When is this not set, chat does dot work, odd behavior
|
||||
$this->_PDO->setAttribute(\PDO::ATTR_EMULATE_PREPARES, false);
|
||||
|
||||
// Throwing exceptions
|
||||
$this->_PDO->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
|
||||
//$this->_PDO->setAttribute(\PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
|
||||
}
|
||||
|
||||
// Just flattern array to be binded : [key1, key2, [key3, [key4]]] => [key1, key2, key3, key4]
|
||||
|
|
Loading…
Reference in a new issue