title: Determine Logic for MySQL Select - Reservation System
body: <p>I'm creating an equipment reservation (PHP/MySQL) for my school.</p>
  
  <p>My database looks like this:</p>
  
  <pre><code>tblEvents:
   id
   start
   end
   equipID
  
  
  tblEquipment:
    id
    name
    description
  </code></pre>
  
  <p>I'd like to know the best way to query the database based on a user's time parameters to see if a certain item is 'not available.'</p>
  
  <p>For example, if I have the following data:</p>
  
  <pre><code>tblEvents:
    id      start          end         equipID
    1     1251312300    1251324000       1
  </code></pre>
  
  <p>And the user submits the query, looking to see if "equipID" 1 is available, and they put: </p>
  
  <p>1251300300 as their start and 1251524000 as their end.    </p>
  
  <p>Any help on getting this started would be great.  Thanks.   </p>