dbms_primeidc_init...1

This commit is contained in:
최준흠 2025-04-03 15:56:03 +09:00
parent 19040d6921
commit 08ec72f897

View File

@ -24,10 +24,6 @@ abstract class Model
final public function getConnect(): PDO
{
if ($this->_db === null) {
$debug = $_ENV['DATABASE_QUERY_DEBUG'] ?? $_SERVER['DATABASE_QUERY_DEBUG'] ?? 'false';
if ($debug === "true") {
$this->_debug = true;
}
$driver = $_ENV['DATABASE_DRIVER'] ?? $_SERVER['DATABASE_DRIVER'] ?? 'mysql';
$host = $_ENV['DATABASE_HOST'] ?? $_SERVER['DATABASE_HOST'] ?? 'localhost';
$dbname = $_ENV['DATABASE_DB'] ?? $_SERVER['DATABASE_DB'] ?? 'test';
@ -56,6 +52,10 @@ abstract class Model
}
private function reset(): void
{
$debug = $_ENV['DATABASE_QUERY_DEBUG'] ?? $_SERVER['DATABASE_QUERY_DEBUG'] ?? 'false';
if ($debug === "true") {
$this->_debug = true;
}
$this->_wheres = [];
$this->_querys = ["SELECT" => "SELECT *", "JOIN" => "", "ORDERBY" => "", "LIMIT" => ""];
}