November 9th, 2000, 12:05 AM
Is there a way in which I can add (or subtract) a couple of columns and spit the result into a different column? For example:
Subtract the value of 'ship decimal(4,2)' from the value of 'gross decimal(4,2)' and automagically put the result into 'net decimal(4,2)'
Thanks for your help!
November 9th, 2000, 02:53 AM
UPDATE your_table SET net = gross - ship;
That will do it for all of the rows, you can add a WHERE clause on the end to specify what rows if you need to.
November 9th, 2000, 03:10 AM
Hey, Thanks. I just figured out how to tally a running total during the php output, but I like the idea of having a total in the DB better.
[This message has been edited by felsheim (edited November 09, 2000).]