escaping type and reorder the field order to reduce line length

This commit is contained in:
Jon Bendtsen
2024-03-16 10:57:53 +01:00
parent b0f3cf4725
commit 2f7d6afc6e

View File

@@ -295,9 +295,9 @@ class Notify
$this->db->begin();
$sql = "INSERT INTO ".MAIN_DB_PREFIX."notify_def (fk_soc, fk_action, type, fk_contact, datec)";
$sql .= " VALUES (".((int) $this->socid).", ".((int) $this->event).", '".$this->type."',";
$sql .= " ".((int) $this->target).",'".$this->db->idate($this->datec)."')";
$sql = "INSERT INTO ".MAIN_DB_PREFIX."notify_def (fk_soc, fk_action, fk_contact, type, datec)";
$sql .= " VALUES (".((int) $this->socid).", ".((int) $this->event).", ".((int) $this->target).",";
$sql .= "'".$this->db->escape($this->type)."', '".$this->db->idate($this->datec)."')";
$resql = $this->db->query($sql);
if ($resql) {
if ($this->db->affected_rows($resql)) {