Update cunits.class.php (#28056)

FIX: error SQL when creating a Cunit
This commit is contained in:
Quentin-Seekness
2024-02-07 17:26:17 +01:00
committed by Laurent Destailleur
parent 27002a95e4
commit 0ad3581e00

View File

@@ -103,14 +103,14 @@ class CUnits extends CommonDict
$sql .= "code,";
$sql .= "label,";
$sql .= "short_label,";
$sql .= "unit_type";
$sql .= "unit_type,";
$sql .= "scale";
$sql .= ") VALUES (";
$sql .= " ".(!isset($this->id) ? 'NULL' : "'".$this->db->escape($this->id)."'").",";
$sql .= " ".(!isset($this->code) ? 'NULL' : "'".$this->db->escape($this->code)."'").",";
$sql .= " ".(!isset($this->label) ? 'NULL' : "'".$this->db->escape($this->label)."'").",";
$sql .= " ".(!isset($this->short_label) ? 'NULL' : "'".$this->db->escape($this->short_label)."'").",";
$sql .= " ".(!isset($this->unit_type) ? 'NULL' : "'".$this->db->escape($this->unit_type)."'");
$sql .= " ".(!isset($this->unit_type) ? 'NULL' : "'".$this->db->escape($this->unit_type)."'").",";
$sql .= " ".(!isset($this->scale) ? 'NULL' : "'".$this->db->escape($this->scale)."'");
$sql .= ")";