dbms_primeidc_init...1
This commit is contained in:
parent
08bde2d3a8
commit
182a73fa9d
@ -41,6 +41,7 @@ abstract class Model
|
|||||||
throw new \Exception("❌ DB 연결 실패: " . $e->getMessage());
|
throw new \Exception("❌ DB 연결 실패: " . $e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$this->reset();
|
||||||
return $this->_db;
|
return $this->_db;
|
||||||
}
|
}
|
||||||
final public function setDebug($debug)
|
final public function setDebug($debug)
|
||||||
@ -51,6 +52,11 @@ abstract class Model
|
|||||||
{
|
{
|
||||||
return $this->_debug;
|
return $this->_debug;
|
||||||
}
|
}
|
||||||
|
private function reset(): void
|
||||||
|
{
|
||||||
|
$this->_wheres = [];
|
||||||
|
$this->_querys = ["SELECT" => "SELECT *", "JOIN" => "", "ORDERBY" => "", "LIMIT" => ""];
|
||||||
|
}
|
||||||
final public function getLastQuery(): string
|
final public function getLastQuery(): string
|
||||||
{
|
{
|
||||||
return $this->_lastQuery;
|
return $this->_lastQuery;
|
||||||
@ -118,8 +124,7 @@ abstract class Model
|
|||||||
$stmt = $this->getConnect()->prepare($query);
|
$stmt = $this->getConnect()->prepare($query);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
if ($this->_reset) {
|
if ($this->_reset) {
|
||||||
$this->_wheres = [];
|
$this->reset();
|
||||||
$this->_querys = ["SELECT" => "SELECT *", "JOIN" => "", "ORDERBY" => "", "LIMIT" => ""];
|
|
||||||
}
|
}
|
||||||
return $stmt;
|
return $stmt;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user