mirror of https://github.com/BOINC/boinc.git
web: suppress mysql connect warnings
This commit is contained in:
parent
eed9bdd373
commit
15ac87749c
|
@ -110,7 +110,7 @@ if (MYSQLI) {
|
|||
}
|
||||
} else {
|
||||
function _mysql_connect($host, $user, $pass, $db_name) {
|
||||
$link = mysql_pconnect($host, $user, $pass);
|
||||
$link = @mysql_pconnect($host, $user, $pass);
|
||||
if (!$link) return null;
|
||||
if (!mysql_select_db($db_name, $link)) {
|
||||
return null;
|
||||
|
|
|
@ -36,9 +36,9 @@ class DbConn {
|
|||
}
|
||||
//if (version_compare(PHP_VERSION, '5.3.0') < 0) {
|
||||
if (1) { // don't use persistent connections for now
|
||||
$this->db_conn = new mysqli($host, $user, $passwd, $name, $port);
|
||||
$this->db_conn = @new mysqli($host, $user, $passwd, $name, $port);
|
||||
} else {
|
||||
$this->db_conn = new mysqli("p:".$host, $user, $passwd, $name, $port);
|
||||
$this->db_conn = @new mysqli("p:".$host, $user, $passwd, $name, $port);
|
||||
}
|
||||
global $mysqli;
|
||||
$mysqli = $this->db_conn;
|
||||
|
|
Loading…
Reference in New Issue