dbms_primeidc_init...1

This commit is contained in:
최준흠 2025-04-03 12:17:47 +09:00
parent 08bde2d3a8
commit 182a73fa9d

View File

@ -41,6 +41,7 @@ abstract class Model
throw new \Exception("❌ DB 연결 실패: " . $e->getMessage());
}
}
$this->reset();
return $this->_db;
}
final public function setDebug($debug)
@ -51,6 +52,11 @@ abstract class Model
{
return $this->_debug;
}
private function reset(): void
{
$this->_wheres = [];
$this->_querys = ["SELECT" => "SELECT *", "JOIN" => "", "ORDERBY" => "", "LIMIT" => ""];
}
final public function getLastQuery(): string
{
return $this->_lastQuery;
@ -118,8 +124,7 @@ abstract class Model
$stmt = $this->getConnect()->prepare($query);
$stmt->execute();
if ($this->_reset) {
$this->_wheres = [];
$this->_querys = ["SELECT" => "SELECT *", "JOIN" => "", "ORDERBY" => "", "LIMIT" => ""];
$this->reset();
}
return $stmt;
}