summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-04-03 22:18:47 +0000
committerDries Buytaert <dries@buytaert.net>2003-04-03 22:18:47 +0000
commit3ab5709af5ba9cb8e3eeef89aff8cf1601fd3022 (patch)
tree1148a6cd610aecff0f0a3740d65ed475cb634797
parent62f5ae01f6f541e5deee0e43ff97a61f789fb657 (diff)
downloadbrdo-3ab5709af5ba9cb8e3eeef89aff8cf1601fd3022.tar.gz
brdo-3ab5709af5ba9cb8e3eeef89aff8cf1601fd3022.tar.bz2
- Changed pconnect() to connect().
-rw-r--r--includes/database.mysql.inc10
1 files changed, 8 insertions, 2 deletions
diff --git a/includes/database.mysql.inc b/includes/database.mysql.inc
index 301bfb567..449622f11 100644
--- a/includes/database.mysql.inc
+++ b/includes/database.mysql.inc
@@ -9,10 +9,16 @@ function db_connect($url) {
$url["host"] = $url["host"] . ":" . $url["port"];
}
- mysql_pconnect($url["host"], $url["user"], $url["pass"]) or die(mysql_error());
+ mysql_connect($url["host"], $url["user"], $url["pass"]) or die(mysql_error());
mysql_select_db(substr($url["path"], 1)) or die("unable to select database");
- // NOTE: we are using a persistent connection!
+ /*
+ ** Note that you can change the 'mysql_connect' statement to 'mysql_pconnect'
+ ** if you want to use persistent connections. This is not recommended on
+ ** shared hosts, might require additional database/webserver tuning but
+ ** increases performance when the overhead to connect to your database is
+ ** high (eg. your database and webserver live on different machines).
+ */
}
function db_query($query) {