Qstr gen for UPDATE

master
E. Almqvist 3 years ago
parent b4e674b9e6
commit 6f4008950e
  1. 8
      src/db_models.rb

@ -4,7 +4,13 @@ class TableModel # Base model
@table_name = table_name @table_name = table_name
end end
private def gen_update_query(vars, values) private def gen_update_query(varhash, values)
qstr = ""
varhash.each do |val, var|
qstr += "#{var} = #{val}, "
end
return qstr
end end
private def get(attr, filter="") private def get(attr, filter="")

Loading…
Cancel
Save