dbms_primeidc_init...1
This commit is contained in:
parent
7324927b23
commit
05724366ea
@ -85,7 +85,7 @@ abstract class Model
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
private function getWhereColumn(mixed $columns, mixed $datas = null): string
|
||||
private function getWhereColumn(mixed $columns, mixed $datas = null, string $delimeter): string
|
||||
{
|
||||
$temps = [];
|
||||
if (is_array($columns)) {
|
||||
@ -108,7 +108,7 @@ abstract class Model
|
||||
|
||||
final public function where(mixed $columns, mixed $values = null, string $delimeter = "AND"): void
|
||||
{
|
||||
$query = $this->getWhereColumn($columns, $values);
|
||||
$query = $this->getWhereColumn($columns, $values, $delimeter);
|
||||
$this->_wheres[] = count($this->_wheres) ? "{$delimeter} {$query}" : $query;
|
||||
}
|
||||
final public function orWhere(mixed $columns, mixed $values = null, string $delimeter = "OR"): void
|
||||
@ -161,12 +161,12 @@ abstract class Model
|
||||
//CURD문
|
||||
final protected function create_process(mixed $columns, mixed $values = null): bool|PDOStatement
|
||||
{
|
||||
$query = sprintf("INSERT INTO %s VALUES(%s) %s", $this->getTable(), $this->getWhereColumn($columns, $values), $this->getWhere());
|
||||
$query = sprintf("INSERT INTO %s VALUES(%s) %s", $this->getTable(), $this->getWhereColumn($columns, $values, ","), $this->getWhere());
|
||||
return $this->execute($query);
|
||||
} //
|
||||
final protected function modify_process(mixed $columns, mixed $values = null): bool|PDOStatement
|
||||
{
|
||||
$query = sprintf("UPDATE %s SET %s %s", $this->getTable(), $this->getWhereColumn($columns, $values), $this->getWhere());
|
||||
$query = sprintf("UPDATE %s SET %s %s", $this->getTable(), $this->getWhereColumn($columns, $values, ","), $this->getWhere());
|
||||
return $this->execute($query);
|
||||
} //
|
||||
final protected function delete_process(): bool|PDOStatement
|
||||
@ -186,7 +186,6 @@ abstract class Model
|
||||
}
|
||||
final public function orderBy(mixed $columns, string $default_direction = ""): void
|
||||
{
|
||||
$orderBy = "";
|
||||
if (is_array($columns)) {
|
||||
foreach ($columns as $column => $direction) {
|
||||
$this->orderBy($column, $direction ?? $default_direction);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user