Commit 07c8c403 authored by screeper's avatar screeper

Set Prefix update

Set prefix with a own method.
parent 5e55af24
...@@ -100,19 +100,19 @@ class MysqliDb ...@@ -100,19 +100,19 @@ class MysqliDb
* @param string $db * @param string $db
* @param int $port * @param int $port
*/ */
public function __construct($host, $username, $password, $db, $prefix = '', $port = NULL) public function __construct($host, $username, $password, $db, $port = NULL)
{ {
$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->_prefix = $prefix;
if($port == NULL) if($port == NULL)
$this->port = ini_get ('mysqli.default_port'); $this->port = ini_get ('mysqli.default_port');
else else
$this->port = $port; $this->port = $port;
$this->connect(); $this->connect();
$this->setPrefix();
self::$_instance = $this; self::$_instance = $this;
} }
...@@ -157,6 +157,16 @@ class MysqliDb ...@@ -157,6 +157,16 @@ class MysqliDb
$this->count = 0; $this->count = 0;
} }
/**
* Method to set a prefix
*
* @param string $prefix Contains a tableprefix
*/
public function setPrefix($prefix = '')
{
$this->_prefix = $prefix;
}
/** /**
* Pass in a raw query and an array containing the parameters to bind to the prepaird statement. * Pass in a raw query and an array containing the parameters to bind to the prepaird statement.
* *
......
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