title: How to select just the available rooms on a reservation system?
body: <p>I'm trying to build a reservation system for a hotel and I don't know how to select just the available rooms?
  I have two tables:
  table of rooms with called "chambre" it have: <code>id, libelle</code> and table called" reservation_client" it has: <code>id, id_client, id_chambre, start, end</code>.
  For the start and end they are the start date of reservation and the end of reservation</p>
  
  <p>This is my select form:</p>
  
  <pre><code>&lt;div class="form-group"&gt;
      &lt;label class="col-sm-2 control-label"&gt;Chambre&lt;/label&gt;
      &lt;div class="col-sm-9"&gt;
          &lt;select class="form-control" name="id_chambre"&gt;
              &lt;option&gt;Selectionnez une chambre&lt;/option&gt;
  
              &lt;?php 
                   /*echo $req2=$bdd-&gt;query('SELECT * FROM reservation_client WHERE $donnees["start"]!==$_POST["start"] ' )/*or die (print_r($bdd-&gt;errorinfo()))*/
                  $req=$bdd-&gt;query('SELECT * FROM chambre' )/*or die (print_r($bdd-&gt;errorinfo()))*/;
  
                  $req2=$bdd-&gt;query('SELECT * FROM reservation_client ' );
                      while ($donnees = $req-&gt;fetch() ) { 
  
                    echo"&lt;option  value='".$donnees['id']."'&gt;".($donnees['libelle']) ."&lt;/option&gt; "  ;                                                 
                        }                   
                ?&gt;
  
          &lt;/select&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I tried this code but without any result:</p>
  
  <pre><code>$req2=$bdd-&gt;query('SELECT * FROM reservation_client WHERE start&lt;end AND end&gt;star ' );
  </code></pre>