diff --git a/modules/ddt/variables.php b/modules/ddt/variables.php index 4aa75d4d3..1a95586d8 100755 --- a/modules/ddt/variables.php +++ b/modules/ddt/variables.php @@ -23,7 +23,7 @@ $r = $dbo->fetchOne('SELECT dt_ddt.*, FROM dt_ddt INNER JOIN an_anagrafiche ON dt_ddt.idanagrafica = an_anagrafiche.idanagrafica LEFT OUTER JOIN an_referenti ON an_referenti.id = dt_ddt.idreferente -WHERE id='.prepare($id_record)); +WHERE dt_ddt.id='.prepare($id_record)); // Variabili da sostituire return [ diff --git a/modules/interventi/variables.php b/modules/interventi/variables.php index b7fe8d31a..199c8c055 100755 --- a/modules/interventi/variables.php +++ b/modules/interventi/variables.php @@ -25,7 +25,7 @@ $r = $dbo->fetchOne('SELECT *, (SELECT descrizione FROM in_statiintervento WHERE idstatointervento=in_interventi.idstatointervento) AS stato FROM in_interventi INNER JOIN an_anagrafiche ON in_interventi.idanagrafica = an_anagrafiche.idanagrafica -WHERE id='.prepare($id_record)); +WHERE in_interventi.id='.prepare($id_record)); // Variabili da sostituire return [ diff --git a/modules/ordini/variables.php b/modules/ordini/variables.php index c94c24e62..7900df889 100755 --- a/modules/ordini/variables.php +++ b/modules/ordini/variables.php @@ -23,7 +23,7 @@ $r = $dbo->fetchOne('SELECT or_ordini.*, FROM or_ordini INNER JOIN an_anagrafiche ON or_ordini.idanagrafica = an_anagrafiche.idanagrafica LEFT OUTER JOIN an_referenti ON an_referenti.id = or_ordini.idreferente -WHERE id='.prepare($id_record)); +WHERE or_ordini.id='.prepare($id_record)); // Variabili da sostituire return [