function insertConfiguration () { if (!parent::insertConfiguration()) { return false; } $serialized_config = serialize($config_obj->config); $time = time(); $query = "INSERT INTO extern_config VALUES (?,?,?,?,0,?,?,?)"; $statement = DBManager::get()->prepare($query); $statement->execute(array($this->id, $this->range_id, $this->module_type, $this->config_name, $serialized_config, $time, $time )); if (!$statement->rowCount()) { return FALSE; } return TRUE; }
function insertConfiguration () { if (!parent::insertConfiguration()) { return false; } $time = time(); $query = "INSERT INTO extern_config SET config_id='{$this->id}', range_id='{$this->range_id}', config_type={$this->module_type}, "; $query .= "name='{$this->config_name}', is_standard=0, mkdate=$time, chdate=$time"; $db->query($query); if ($db->affected_rows() != 1) { return FALSE; } return TRUE; }