Skip to content

Commit

Permalink
Enabled persistent DB connections
Browse files Browse the repository at this point in the history
  • Loading branch information
Hal9000 committed May 22, 2012
1 parent 0507cdb commit db81041
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/magirc/DB.class.php
Expand Up @@ -40,7 +40,7 @@ function __destruct() {
*/
function connect($dsn, $username, $password) {
try {
$this->pdo = new PDO($dsn, $username, $password);
$this->pdo = new PDO($dsn, $username, $password, array(PDO::ATTR_PERSISTENT => true));
$this->pdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
$this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$this->pdo->query("SET NAMES utf8");
Expand Down

0 comments on commit db81041

Please sign in to comment.