diff --git a/www/lib/CoreLibs/Output/Form/Generate.inc b/www/lib/CoreLibs/Output/Form/Generate.inc index 9926ea7b..3cee2666 100644 --- a/www/lib/CoreLibs/Output/Form/Generate.inc +++ b/www/lib/CoreLibs/Output/Form/Generate.inc @@ -1351,11 +1351,11 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO } // set type and boundaries for insert/update if ($data_array['pk_id'] && $_POST[$prfx.$el_name][$i]) { - $q_begin[$i] = 'UPDATE $table_name SET '; - $q_end[$i] = ' WHERE $el_name = '.$_POST[$prfx.$el_name][$i]; + $q_begin[$i] = 'UPDATE '.$table_name.' SET '; + $q_end[$i] = ' WHERE '.$el_name.' = '.$_POST[$prfx.$el_name][$i]; $type[$i] = 'update'; } elseif ($data_array['pk_id'] && !$_POST[$prfx.$el_name][$i]) { - $q_begin[$i] = 'INSERT INTO $table_name ('; + $q_begin[$i] = 'INSERT INTO '.$table_name.' ('; $q_middle[$i] = ') VALUES ('; $q_end[$i] = ')'; $type[$i] = 'insert';