I know this question has asked many times in SO,but i couldn\'t figure out my exact problem.
I am using the following code to get the data from the database(Table1)
What if you comment out db.updateAverage(id, average) ?
db.updateAverage(id, average)