I am trying to update a column with help of previously updated column in phpMyAdmin. I am trying to calculate ratio by dividing advance by dep (ratio=advance/dep). I have this table :
#id# #dep# #cash# #advance# #ratio#
----------------------------------------
1 100 100 200 0
----------------------------------------
2 200 300 500 0
----------------------------------------
I am trying this code :
Update 'table1' Set 'ratio'= 'advance'/'dep';
I expect output to be 200/100 = 2 updated in ratio when i update value of columns dep or advance in table.