title: Query the Next Time Interval
body: <p>Im trying to query the upper available "time range" from a mySQL table</p>
  
  <pre><code>+----+----------+---------+
  | id | timefrom | timeto  | 
  +----+----------+---------+
  |  0 | 08:30    | 10:30   |
  |  7 | 15:00    | 16:00   |
  |  2 | 17:00    | 17:30   |
  |  8 | 18:00    | 21:00   |
  +----+----------+---------+
  </code></pre>
  
  <p>the query result would be the next available time range which is 10:30 to 15:00</p>
  
  <p>edit1: id is not in sequence</p>
  
  <p>thanks!</p>