Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Change mysql_connect to mysql_pconnect throughout #17

Merged
merged 1 commit into from Oct 15, 2012
Jump to file or symbol
Failed to load files and symbols.
+3 −3
Split
View
@@ -16,7 +16,7 @@ function db_connect($host='localhost',$user=null,$password=null)
{
static $dbh = null;
if (!empty($host) && isset($user) && isset($password)) {
- $dbh = @mysql_connect($host,$user,$password);
+ $dbh = @mysql_pconnect($host,$user,$password);
}
if (is_resource($dbh)) {
return $dbh;
View
@@ -55,7 +55,7 @@ function connect($dbtype='db_write')
$details = $this->db_details[$dbtype];
- $db = @mysql_connect($details['host'],$details['user'],$details['pass']);
+ $db = @mysql_pconnect($details['host'],$details['user'],$details['pass']);
if (is_resource($db) && !@mysql_db_name($db)) {
@mysql_select_db($details['name'],$db);
$this->$dbtype = $db;
View
2 bouncer/php/test.php 100644 → 100755
@@ -58,7 +58,7 @@
global $results;
// Check Main Database
- $dbh = @mysql_connect(DBHOST.':'.DBPORT,DBUSER,DBPASS);
+ $dbh = @mysql_pconnect(DBHOST.':'.DBPORT,DBUSER,DBPASS);
testo('Connect to MAIN database ('.DBHOST.')', is_resource($dbh));
testo('Select MAIN database ('.DBNAME.')', @mysql_select_db(DBNAME, $dbh));
unset ($dbh);