div TODOs
This commit is contained in:
@@ -8,11 +8,19 @@ class SQL {
|
||||
public $cnt_get = 0;
|
||||
public $cnt_set = 0;
|
||||
public function __construct() {
|
||||
require_once ('secret.php');
|
||||
if (defined('DB_HOST') && defined('DB_USER') && defined('DB_PASS') && defined('DB_NAME')) {
|
||||
$this->m = [
|
||||
'host' => DB_HOST,
|
||||
'user' => DB_USER,
|
||||
'pass' => DB_PASS,
|
||||
'data' => DB_NAME
|
||||
];
|
||||
} else {
|
||||
require_once ('secret.php');
|
||||
$this->m = $_m;
|
||||
}
|
||||
|
||||
$this->m = $_m;
|
||||
|
||||
$this->h = new mysqli ( $_m ['host'], $_m ['user'], $_m ['pass'], $_m ['data'] );
|
||||
$this->h = new mysqli ( $this->m ['host'], $this->m ['user'], $this->m ['pass'], $this->m ['data'] );
|
||||
if ($this->h->connect_errno) {
|
||||
return false;
|
||||
}
|
||||
@@ -171,4 +179,4 @@ class SQL {
|
||||
// echo 'DESTROY';
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user