Hey Guys, ive got another PHP Challenge for you.
I have a MySQL table with 2 columns and a large number of rows.
The first column is a unix timestamp and each row increments by 1 day which in Unix time is 86400 seconds.
The second column is a randomly generated integer value sumed to the value of the previous column
In theory each day or row has its own value thats summed to the previous cell, because this value isnt currently recorded down I need to add a row to that table called dailyvalue, each cell displays the amount added to the previous value to get to the current value.
If you havent grasped it yet:
dailyvalue = current row value - previous row value
Heres a example of the end result created in Excel: [attachment=135]
Dont forget that all I require is the last column (dailyvalue). Everything else has already been created. All your doing is subtracting the current value from the value in the previous cell and putting it into the cell to the right of it.
Let me know if you have any questions, I know I make this sound so much more complex than it seems.
Thanks
I have a MySQL table with 2 columns and a large number of rows.
The first column is a unix timestamp and each row increments by 1 day which in Unix time is 86400 seconds.
The second column is a randomly generated integer value sumed to the value of the previous column
In theory each day or row has its own value thats summed to the previous cell, because this value isnt currently recorded down I need to add a row to that table called dailyvalue, each cell displays the amount added to the previous value to get to the current value.
If you havent grasped it yet:
dailyvalue = current row value - previous row value
Heres a example of the end result created in Excel: [attachment=135]
Dont forget that all I require is the last column (dailyvalue). Everything else has already been created. All your doing is subtracting the current value from the value in the previous cell and putting it into the cell to the right of it.
Let me know if you have any questions, I know I make this sound so much more complex than it seems.
Thanks