From 80af7b029a5d20808e55e13d928a1e6e96055fe0 Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Tue, 15 Feb 2022 15:52:12 +0100 Subject: [PATCH] correction bug --- include/db.class.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/include/db.class.php b/include/db.class.php index 70ee072..57061e6 100644 --- a/include/db.class.php +++ b/include/db.class.php @@ -196,17 +196,18 @@ class db function savePeripetie() { - $query = "INSERT INTO avionPeripetie ('expeMail', 'idAvion', 'idPeripetie', 'date'), VALUES ("; - if ($this->expeKnown) - { - $query .= "'" . $this->protect($this->expeMail) . "',"; - }else - { - $query .= "'contact@avion-poe.me',"; - } + $query = "INSERT INTO avionPeripetie ('idAvion', 'idPeripetie', 'date', 'expeMail'), VALUES ("; $query .= "'" . $this->protect($this->uid) . "',"; $query .= "'" . $this->protect($this->idPeripetie) . "', "; - $query .= "FROM_UNIXTIME(" . $this->protect($this->datePeripetie) . "))"; + $query .= "FROM_UNIXTIME(" . $this->protect($this->datePeripetie) . "),"; + if ($this->expeKnown) + { + $query .= "'" . $this->protect($this->expeMail) . "'"; + }else + { + $query .= "'contact@avion-poe.me'"; + } + $query .= ")"; log_write("savePeripetie " . $query); //$query .= $this->protect($this->effetPeripetie) . "', '"; //$query .= $this->protect($this->expeMail) . "', '";