title: Mysql query to calculate total cost
body: <p>HI
  I have a table listsing_prices (id,listing_id,day_from,day_to,price)
  I need to calculate the total cost of an holiday in mysql becouse I need to sort the results by total cost.</p>
  
  <p>EX:</p>
  
  <pre><code>VALUES IN TABLE
  1  6   2011-04-27   2011-04-30   55,00
  2  6   2011-05-01   2011-05-02   60,00
  3  6   2011-05-03   2011-05-15   65,00
  </code></pre>
  
  <p>holiday from 2011-04-28 to 2011-05-05 total cost = 480</p>