title: Select row between certain range of date
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/10511205/how-to-look-which-room-is-available-between-2-datetimes">How to look which room is available between 2 dateTimes</a>  </p>
  </blockquote>
  
  
  
  <p>I have this row of data</p>
  
  <pre><code>|room_id|checkin     |checkout  |
  +       +            +          +
  |1      |2012-05-02  |2012-05-09|
  </code></pre>
  
  <p>But I don't want to choose this row which betweeen two dates</p>
  
  <p>I have this query</p>
  
  <pre><code>SELECT * 
  FROM `reservations`  `res` 
  WHERE (2012-05-03 
     NOT BETWEEN res.expected_checkin_date AND res.expected_checkout_date) 
   AND COALESCE(2012-05-08 
     NOT BETWEEN res.expected_checkin_date AND res.expected_checkout_date) 
  </code></pre>
  
  <p>However, I am still getting this row which is not suppposed to come up. Actually, my idea is to choose all rows which is not between these two date. Any idea?</p>
  
  <h2>Update 1</h2>
  
  <p>Basically, someone is trying to reserve a room from 5/3 to 5/8 and I want to see a list of rooms that would meet that criteria.</p>