title: Need to store multiple date range values and retrieve them via sql
body: <p>I'm building a home rental system. The system stores profiles of homes and users can book homes for rent for periods as between one day to a year. I've got the booking part all set up except I am faced with a requirement from teh client to be able to set certain dates and date ranges as un bookable for homes.</p>
  
  <p>A home can be available for a whole year for rent, or can be available for 6 months, or be unavailable on discreet days eg: Holidays and weekends for summer homes etc.</p>
  
  <p>I'm perplexed as how would I be able to set up a database table to store this information considering that the information must be retrievable by a sql query. I mean consider the following situation, a home can be rented through out the year except on wednesdays, the 4th of July, 10 November to 25th December and 31st December.</p>
  
  <p>How do I store this in a database and be able to run a query to check for a homes availability between set dates. I'm wokring in php MySql</p>