update stat data to db