aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-27 15:05:40 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-27 15:05:40 +0000
commit5aa81ebf7107556b39336a326abc421d715c3650 (patch)
tree5350f65f1cb7108e5403e58e792c4380c847dd3e /engine
parentf1d727dafed21e7fb7027b7ac95d006d72339d23 (diff)
downloadelgg-5aa81ebf7107556b39336a326abc421d715c3650.tar.gz
elgg-5aa81ebf7107556b39336a326abc421d715c3650.tar.bz2
Using persistent db connections. This should speed up pages with numerous small DB calls. Please report any issues asap. Refs #101
git-svn-id: https://code.elgg.org/elgg/trunk@1184 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/database.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/engine/lib/database.php b/engine/lib/database.php
index 9bbd9f5c6..13ebbbd0c 100644
--- a/engine/lib/database.php
+++ b/engine/lib/database.php
@@ -49,7 +49,7 @@
}
// Connect to database
- if (!$dblink[$dblinkname] = mysql_connect($CONFIG->dbhost, $CONFIG->dbuser, $CONFIG->dbpass, true))
+ if (!$dblink[$dblinkname] = mysql_pconnect($CONFIG->dbhost, $CONFIG->dbuser, $CONFIG->dbpass, true))
throw new DatabaseException(sprintf(elgg_echo('DatabaseException:WrongCredentials'), $CONFIG->dbuser, $CONFIG->dbhost, $CONFIG->debug ? $CONFIG->dbpass : "****"));
if (!mysql_select_db($CONFIG->dbname, $dblink[$dblinkname]))
throw new DatabaseException(sprintf(elgg_echo('DatabaseException:NoConnect'), $CONFIG->dbname));