I have a tables in a MySQL database like this:
Intially it will be like this. i want to update the table using query.
inital Weekly =5, and update it in accural, next i want to update the 5+6=11 in accural next 11+7 =18 in accural column
how to do that?
Leave:
userid | Weekly |Accural |
-----------+--------+---------+
1 | 5 | |
2 | 5 | |
3 | 5 | |
OUTPUT:
userid | Weekly |Accural |
-----------+--------+---------+
1 | 5 | 5 |
2 | 6 | 11 |
3 | 7 | 18 |