Update a field by going through each record

1

I want to update records based on a variable $aux = 110 , for example. In the image the first row has an amount of 80. Therefore it must be zero and move to the next record with what about 110-80 = 30 . Then, the next record should be 100-30 = 70 and so on until there is $aux=0 .

Final result:

    
asked by sebamim 21.10.2018 в 17:14
source

0 answers