Fix: Failed to create

This commit is contained in:
Laurent Destailleur 2008-10-07 20:07:28 +00:00
parent 57ef5a4082
commit 7553e0473e

View File

@ -136,8 +136,10 @@ class Categorie
return -1;
}
$sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie (label, description, fk_soc, visible, type) ";
$sql .= "VALUES ('".addslashes($this->label)."', '".addslashes($this->description)."',".$this->socid.",'".$this->visible."',".$this->type.")";
$sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie (label, description, fk_soc, visible, type) ";
$sql.= "VALUES ('".addslashes($this->label)."', '".addslashes($this->description)."',";
$sql.= ($this->socid?$this->socid:"null").",";
$sql.= "'".$this->visible."',".$this->type.")";
$res = $this->db->query ($sql);