title: PHP Booking timeslot
body: <p>Im developing a php booking system based on timeslot for daily basis.
  Ive set up 4 database tables!</p>
  
  <ol>
  <li>Bookslot (which store all the ids - id_bookslot, id_user, id_timeslot)</li>
  <li>Timeslot (store all the times on 15 minutes gap ex: 09:00, 09:15, 09:30, etc)</li>
  <li>Therapist (store all therapist details)</li>
  <li><p>User (store all the members detail)</p>
  
  <blockquote>
    <h2>ID_BOOKSLOT  ID_USER  ID_THERAPIST  ID_TIMESLOT</h2>
  
  <pre><code>1           10          1        1  (09:00)  
  2           11          2        1  (09:00)  
  3           12          3        2  (09:15)
  4           15          3        1  (09:00)
  </code></pre>
  </blockquote></li>
  </ol>
  
  <p>Now, my issue is, it keep showing repeation for timeslot when i want echoing the data for example:</p>
  
  <pre><code>            thera a       thera b       thera c
    -------------------------------------------------
   09:00       BOOKED      available      available
   09:00     available       BOOKED       available
   09:00     available     available        BOOKED 
   09:15     available       BOOKED       available
  </code></pre>
  
  <p>as you can see, 09:00 showing three times, and i want something like below</p>
  
  <pre><code>           thera a       thera b       thera c
  -------------------------------------------------
   09:00      BOOKED        BOOKED         BOOKED    
   09:15     available      BOOKED       available
  </code></pre>
  
  <p>There might be something wrong with joining the table or else.
  The code to join the table </p>
  
  <pre><code>$mysqli-&gt;query("SELECT * FROM bookslot RIGHT JOIN timeslot ON bookslot.id_timeslot = timeslot.id_timeslot LEFT JOIN therapist ON bookslot.id_therapist = therapist.id_therapist"
  </code></pre>
  
  <p>if anyone have the solution for this system, please help me out and i appriciate it much! </p>