title: Mysql query to retrieve record using between for two dates
body: <p>I have one requirement and i am totally confused how to write the query. I am a fresher in this company so please help me</p>
  
  <p>User will select the following Dates:</p>
  
  <p>Ex:
  fromDate: <code>2013-08-02</code> toDate: <code>2013-09-03</code> (YYYY-MM-DD)</p>
  
  <pre><code>id  resort_id   room_id Date1       Date2       price
  5   35      45          2013-11-01  2013-11-30  3000.00
  6   35      50          2013-07-25  2013-08-25  2000.00
  7   35      541         2013-07-25  2013-08-25  4000.00
  8   35      541         2013-08-26  2013-09-26  4000.00
  </code></pre>
  
  <p>Now i should get price based result for each date or sum of the price for both the date group by room id</p>
  
  <p>Expected result</p>
  
  <pre><code>id  resort_id   room_id     Date1       Date2       price
  6   35      50              2013-07-25  2013-08-25  2000.00
  7   35      541             2013-07-25  2013-08-25  4000.00
  8   35      541             2013-08-26  2013-09-26  4000.00
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>id  resort_id      room_id  price
  6   35             50       2000.00
  7   35             541      8000.00
  </code></pre>