Write two fields to db