title: Mysql join query on three tables with multiple columns
body: <p>I have three tables like this:</p>
  
  <p><strong>Specialisation</strong></p>
  
  <pre><code>sid | s_name
  --------------
   1  | test 1
   2  | test 2  
  </code></pre>
  
  <p><strong>Person</strong></p>
  
  <pre><code>pid | name | sid
  ------------------
   1  | ABC  |  1
   2  | XYZ  |  2
  </code></pre>
  
  <p><strong>Timing</strong></p>
  
  <pre><code>tid | time_from | time_to  | pid
  ----------------------------------
   1  | 08:00:00  | 10:00:00 |  1
   2  | 20:00:00  | 22:00:00 |  1
   3  | 09:00:00  | 14:00:00 |  2
   4  | 19:00:00  | 20:00:00 |  2
  </code></pre>
  
  <p>**I want to get result something like this*</p>
  
  <pre><code>pid | name | s_name | time_from  | time_to
  --------------------------------------------
   1  | ABC  | test 1 | 08:00:00   | 10:00:00
  </code></pre>
  
  <p>Description:<br>
  All three tables are connected.<br>
  I want all records where<br>
  <strong>specialisation</strong> id = '1'<br>
  <strong>person</strong> name <strong>Like</strong> 'ABC'<br>
  <strong>timing</strong> is in between '08:00:00' and '10:00:00'. <br><br> 
  I tried several combinations of mysql joins but not able to fetch the data correctly. </p>