title: Sum of column equals, A - B
body: <p>This may be a fairly straight forward one. I'm playing around with a little app I'm trying to create. I've got a form where users submit their "buy_price" and "sell_price". I am then trying to work out if they have made a loss or a profit. Would it be better to have a column within the database that works out the "margin" i.e "margin coulmn = sell_price-buy_price" (and how would I do this). Or would it be better to do this within php. </p>
  
  <p>Thank you in advance.</p>
  
  <p>Dan</p>
  
  <p>Edit: I use a database because I store the data and then they can view their purchase history. I then want to make a section such as "best trades" for ones with highest margin etc. </p>