Commit 678d6363 authored by Alexander Butenko's avatar Alexander Butenko Committed by GitHub

Merge pull request #595 from avbdr/master

liberate username and password variables for dbobject use
parents f2b91854 4397e47d
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* @copyright Copyright (c) 2010-2016 * @copyright Copyright (c) 2010-2016
* @license http://opensource.org/licenses/gpl-3.0.html GNU Public License * @license http://opensource.org/licenses/gpl-3.0.html GNU Public License
* @link http://github.com/joshcam/PHP-MySQLi-Database-Class * @link http://github.com/joshcam/PHP-MySQLi-Database-Class
* @version 2.7 * @version 2.8-master
*/ */
class MysqliDb class MysqliDb
...@@ -136,8 +136,8 @@ class MysqliDb ...@@ -136,8 +136,8 @@ class MysqliDb
* @var string * @var string
*/ */
protected $host; protected $host;
protected $username; protected $_username;
protected $password; protected $_password;
protected $db; protected $db;
protected $port; protected $port;
protected $charset; protected $charset;
...@@ -244,8 +244,8 @@ class MysqliDb ...@@ -244,8 +244,8 @@ class MysqliDb
$this->host = $host; $this->host = $host;
} }
$this->username = $username; $this->_username = $username;
$this->password = $password; $this->_password = $password;
$this->db = $db; $this->db = $db;
$this->port = $port; $this->port = $port;
$this->charset = $charset; $this->charset = $charset;
...@@ -278,7 +278,7 @@ class MysqliDb ...@@ -278,7 +278,7 @@ class MysqliDb
throw new Exception('MySQL host is not set'); throw new Exception('MySQL host is not set');
} }
$this->_mysqli = new mysqli($this->host, $this->username, $this->password, $this->db, $this->port); $this->_mysqli = new mysqli($this->host, $this->_username, $this->_password, $this->db, $this->port);
if ($this->_mysqli->connect_error) { if ($this->_mysqli->connect_error) {
throw new Exception('Connect Error ' . $this->_mysqli->connect_errno . ': ' . $this->_mysqli->connect_error, $this->_mysqli->connect_errno); throw new Exception('Connect Error ' . $this->_mysqli->connect_errno . ': ' . $this->_mysqli->connect_error, $this->_mysqli->connect_errno);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment