update the result to db