mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-02 08:42:15 +09:00
Clean up duplicate methods in classes that inherit the MySQL base class
This commit is contained in:
parent
708fbb4f06
commit
ecac6d1490
3 changed files with 16 additions and 677 deletions
|
|
@ -15,26 +15,6 @@ require_once('DBMysql.class.php');
|
|||
*/
|
||||
class DBMysqli extends DBMysql
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @return void
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
$this->_setDBInfo();
|
||||
$this->_connect();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of this class
|
||||
* @return DBMysqli return DBMysqli object instance
|
||||
*/
|
||||
function create()
|
||||
{
|
||||
return new DBMysqli;
|
||||
}
|
||||
|
||||
/**
|
||||
* DB Connect
|
||||
* this method is private
|
||||
|
|
@ -65,7 +45,8 @@ class DBMysqli extends DBMysql
|
|||
$this->setError($error, mysqli_connect_error());
|
||||
return;
|
||||
}
|
||||
mysqli_set_charset($result, 'utf8');
|
||||
$charset = isset($connection["db_charset"]) ? $connection["db_charset"] : 'utf8';
|
||||
mysqli_set_charset($result, $charset);
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue