title: query sql combine multiple tables
body: <p>I have a table as below</p>
  
  <h1>book</h1>
  
  <ul>
  <li>idbook</li>
  <li>idapplicant</li>
  <li>idsiteplan</li>
  <li>date</li>
  </ul>
  
  <h1>applicant</h1>
  
  <ul>
  <li>idapplicant</li>
  <li>name_applicant</li>
  </ul>
  
  <h1>siteplan</h1>
  
  <ul>
  <li>idsiteplan</li>
  <li>plan</li>
  </ul>
  
  <h1>detail</h1>
  
  <ul>
  <li>iddetail</li>
  <li>idbook</li>
  <li>name</li>
  <li>value</li>
  </ul>
  
  <p>how to implement the query so that it becomes as below</p>
  
  <pre><code>-------------------------------------------------------------------------------
  | name_applicant| siteplan| date       | detail                               |
  -------------------------------------------------------------------------------
  | aaa           | tapak1  | 12-12-2013 | name_of_detail_1 : value_of_detail_1 |
  |                                        name_of_detail_2 : value_of_detail_2 |
  |                                        name_of_detail_3 : value_of_detail_3 |
  |                                        name_of_detail_4 : value_of_detail_4 |
  -------------------------------------------------------------------------------
  | bbb           | tapak2 | 13-12-2013 | name_of_detail_1 : value_of_detail_1  |
  |                                       name_of_detail_2 : value_of_detail_2  |
  |                                       name_of_detail_3 : value_of_detail_3  |
  |                                       name_of_detail_4 : value_of_detail_4  |
  -------------------------------------------------------------------------------
  </code></pre>
  
  <p>Thanks a lot</p>