I am creating a ledger with datatables. I want a column that keeps a running balance on each row and updates if you change, add, or delete the value of Income or expense fields. How do I create that balance column and have it update? I could have swore I saw an example on the site, but can't find it again.
For clarification I have an Income column, an expense column, and a balance column. The income and expense column data are pulled from mysql with an ajax and php script. I then want to create a balance column from the previous row and adds or subtracts the income/ expense column from the current row.