title: How to check if a date is between date1 and date2 using mysql?
body: <p>I'm trying to write a query that will check today's date against my table columns date1 and date2 in mysql/php.. This is what I'm after:</p>
  
  <p>'events' table:</p>
  
  <ul>
  <li>date1 = start date (XXXX-XX-XX)</li>
  <li>date2 = end date (XXXX-XX-XX)</li>
  </ul>
  
  <p>query:</p>
  
  <ul>
  <li>select * from events where 2012-01-18 between date1 and date2 (or equal to date1 and date2)</li>
  </ul>
  
  <p>But I'm not sure how to go about it.. any help would be appreciated :)</p>
  
  <p>EDIT:</p>
  
  <p>Maybe I was unclear.. if todays date = '2012-01-18' I need it to find results if today's date is between the date range of date1 and date2.. So date1 may be '2012-01-04' and date2 may be '2012-01-21'.. so if todays date falls between or on those dates, a result is returned..</p>