title: selecting available rooms from the database using start and end time
body: <p>I have two tables </p>
  
  <pre><code>bookings(id, title, start_time, end_time, date, room_id) 
  
  rooms(id, name, status )
  </code></pre>
  
  <p>A user is supposed to enter the start time,  end time and the date in the form and then compared them with the end_time and start of the already existing events in the database in then return a list of available rooms   to  the user so that he can book that room. how can I do this in mysql and php.Thank you. </p>