title: Checking a table for time overlap?
body: <p>I have a MySQL table with the following fields:</p>
  
  <ul>
  <li>name</li>
  <li>starttime</li>
  <li>endtime</li>
  </ul>
  
  <p><code>starttime</code> and <code>endtime</code> are MySQL <code>TIME</code> fields (not <code>DATETIME</code>). I need a way to periodically "scan" the table to see if there are any overlaps in time ranges within the table. If there is an event from <code>10:00-11:00</code> and another from <code>10:30-11:30</code>, I want to be alerted of the presence of the time overlap.</p>
  
  <p>Nothing fancy really, all I want to know whether an overlap exists or not. </p>
  
  <p>I'm going to be using PHP to execute this.</p>