Browse files

Merge pull request #17 from lauraxt/pconnect

Change mysql_connect to mysql_pconnect throughout
  • Loading branch information...
2 parents 3108625 + e6496b9 commit deec8b8b7f94f96818740cca42df501e50776df3 @brandonsavage brandonsavage committed Oct 15, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 bouncer/php/lib/db.php
  2. +1 −1 bouncer/php/lib/sdo.php
  3. +1 −1 bouncer/php/test.php
View
2 bouncer/php/lib/db.php
@@ -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
2 bouncer/php/lib/sdo.php
@@ -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);

0 comments on commit deec8b8

Please sign in to comment.