update input db method