User Edit

This commit is contained in:
2020-06-23 20:57:54 +02:00
parent b6c726bad5
commit 9cbd129d4e
6 changed files with 226 additions and 34 deletions

View File

@@ -203,12 +203,13 @@ abstract class SQL {
public function executeDelete(Delete $delete) {
$params = array();
$table = $this->tableName($delete->getTable());
$where = $this->getWhereClause($delete->getConditions(), $params);
$query = "DELETE FROM $table$where";
if($delete->dump) { var_dump($query); }
return $this->execute($query);
return $this->execute($query, $params);
}
public function executeTruncate(Truncate $truncate) {
@@ -222,7 +223,7 @@ abstract class SQL {
$valueStr = array();
foreach($update->getValues() as $key => $val) {
$valueStr[] = "$key=" . $this->addValue($val, $params);
$valueStr[] = $this->columnName($key) . "=" . $this->addValue($val, $params);
}
$valueStr = implode(",", $valueStr);