Backtick the fields when updating Monitors
This commit is contained in:
parent
6925a75831
commit
deefa0754d
|
@ -456,7 +456,7 @@ private $control_fields = array(
|
|||
|
||||
$fields = array_keys($this->defaults);
|
||||
|
||||
$sql = 'UPDATE Monitors SET '.implode(', ', array_map(function($field) {return $field.'=?';}, $fields )) . ' WHERE Id=?';
|
||||
$sql = 'UPDATE Monitors SET '.implode(', ', array_map(function($field) {return '`'.$field.'`=?';}, $fields )) . ' WHERE Id=?';
|
||||
$values = array_map(function($field){return $this->{$field};}, $fields);
|
||||
$values[] = $this->{'Id'};
|
||||
dbQuery($sql, $values);
|
||||
|
|
Loading…
Reference in New Issue