Each row of my table has a child, For example ID 1 is parent of 11 and 11 is parent of 111 and each row has a balance, I need that if I update the balance of 111, the balance of 11 update and the balance of 1 too
for example: UPDATE ACCOUNTS SET value = 100 WHERE ID = 1
In this case the value of 11 is going to be 100 and the value of 1
then I can do something like this : UPDATE ACCOUNTS SET value = value + 150 WHERE ID = 11;
in this case The value of 11 is going to be 250 and the value of 1 will be 250 and the value of 1 should stay 100. I need to do something like that
IM using mySQL