I had this code snippet... var ctr = 0; var total = 0; for (ctr = 0; ctr
I'd recommend you visualize your results first:
var buff = '';
for (var y=0; y
for (var x=0; x
buff += tf[y][x]+"\t";
}
buff += "\n";
}
Also, since you only need to calculate sum of all records, it would be much easier to use SUM() inside your SQL query rather that trying to bring an array back to client side and calculate sum there.