git-svn-id: https://msi/svn/firstRepo/Service/branches/Manut_2.2.3@69 0f545695-f87b-41b6-9a03-7f16563b5454
This commit is contained in:
+3
-3
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user