title: Mysql Find free time (slots) between appointments for booking system
body: <p>I'm trying to find the free time slots between 2 datetime field that match a specific duration for a booking system, but I'am stuck on the correct query.</p>
  
  <p>my db Events:</p>
  
  <pre><code>
  +----------+---------------------+---------------------+---------+
  | Event_ID | StartTime           | EndTime             | Pers_ID |
  +----------+---------------------+---------------------+---------+
  |        3 | 2013-09-21 16:00:00 | 2013-09-21 16:30:00 |       6 | 
  |       21 | 2013-09-21 09:00:00 | 2013-09-21 09:15:00 |       6 | 
  |        5 | 2013-09-21 09:15:00 | 2013-09-21 10:15:00 |       6 | 
  |       64 | 2013-09-21 15:00:00 | 2013-09-21 15:45:00 |       6 | 
  |       32 | 2013-09-21 10:15:00 | 2013-09-21 11:30:00 |       6 | 
  |        6 | 2013-09-21 13:00:00 | 2013-09-21 14:45:00 |       6 | 
  +----------+---------------------+---------------------+---------+
  </code></pre>
  
  <p>The result must be the  free possible slots of 75 minutes with Pers_ID=6 between 2013-09-21 09:00:00 AND 2013-09-21 22:00:00 , and also they have to start right after an EndTime already in the database</p>
  
  <p>Already thanks for the help,<br>
  E-raser</p>