Permalink
Browse files

Enabled persistent DB connections

  • Loading branch information...
1 parent 0507cdb commit db810414451c2d8ad5c3614622aca91c2110eac0 @h9k committed May 22, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/magirc/DB.class.php
View
@@ -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");

0 comments on commit db81041

Please sign in to comment.