Backtick the fields when updating Monitors

This commit is contained in:
Isaac Connor 2019-09-16 10:53:06 -04:00
parent 6925a75831
commit deefa0754d
1 changed files with 1 additions and 1 deletions

View File

@ -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);