From cfb61898b3edf68c67b3a5ab782362698fefb3ae Mon Sep 17 00:00:00 2001 From: hexstudy Date: Wed, 17 Feb 2016 16:34:01 +0000 Subject: [PATCH] git-svn-id: https://msi/svn/firstRepo/Service/branches/Manut_2.2.3@69 0f545695-f87b-41b6-9a03-7f16563b5454 --- management.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/management.php b/management.php index 3358b02..628e9a6 100644 --- a/management.php +++ b/management.php @@ -103,8 +103,8 @@ $app->post('/ricetta/body', function () use ($app) { $queryDelete = "DELETE FROM ingredienti where ID_RICETTE = " . $json_data_body->ricettaID; $mysqlconnetion->executeQuery($queryDelete); - $queryDelete = "UPDATE ricette SET data_modifica = NOW() where ID = " . $json_data_body->ricettaID; - $mysqlconnetion->executeQuery($queryDelete); + $queryUpdDataMod = "UPDATE ricette SET data_modifica = NOW() where ID = " . $json_data_body->ricettaID; + $mysqlconnetion->executeQuery($queryUpdDataMod); $retNewID = $json_data_body->ricettaID; } else { @@ -125,7 +125,7 @@ $app->post('/ricetta/body', function () use ($app) { } $query = "insert into ingredienti(ID_TIPO_INGREDIENTI, ID_RICETTE, Quantita, ID_TIPO_QUANTITA, Note, Posizione) values (" . - $arr->ingrediente_id . "," . $retNewID . "," . ($arr->quantita == "" ? "0" : $arr->quantita) . "," . ($arr->tipo_quantita_id == "" ? "NULL" : $arr->tipo_quantita_id) . ",'" . $note . "'," . $pos . ")"; + $arr->ingrediente_id . "," . $retNewID . ",'" . ($arr->quantita == "" ? "0" : $arr->quantita) . "'," . ($arr->tipo_quantita_id == "" ? "NULL" : $arr->tipo_quantita_id) . ",'" . $note . "'," . $pos . ")"; $mysqlconnetion->insertRecord($query); $pos = $pos + 1;