From 2e7028c976023ebf5c03bfaaad9f91be8a01e932 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Mon, 25 Apr 2016 22:03:02 -0700 Subject: some cleanup on the mysqli driver --- include/dba/dba_mysqli.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/include/dba/dba_mysqli.php b/include/dba/dba_mysqli.php index 6986d4586..57a7559a1 100755 --- a/include/dba/dba_mysqli.php +++ b/include/dba/dba_mysqli.php @@ -4,20 +4,26 @@ require_once('include/dba/dba_driver.php'); class dba_mysqli extends dba_driver { - function connect($server, $port, $user,$pass,$db) { + function connect($server,$port,$user,$pass,$db) { if($port) $this->db = new mysqli($server,$user,$pass,$db, $port); else $this->db = new mysqli($server,$user,$pass,$db); - if(! mysqli_connect_errno()) { - $this->connected = true; + if($this->db->connect_error) { + $this->connected = false; + $this->error = $this->db->connect_error; + + if(file_exists('dbfail.out')) { + file_put_contents('dbfail.out', datetime_convert() . "\nConnect: " . $this->error . "\n", FILE_APPEND); + } + + return false; } - if($this->connected) { + else { + $this->connected = true; return true; } - $this->error = $this->db->connect_error; - return false; } function q($sql) { -- cgit v1.2.3 From 563e82feff1af3abe31b27ee16f93ec46c2dbf73 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 26 Apr 2016 01:06:25 -0700 Subject: revup --- version.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.inc b/version.inc index fcbe13e41..6ea8427f5 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2016-04-25.1377H +2016-04-26.1378H -- cgit v1.2.3