title: Displaying m:n relationship in database
body: <p>how do you construct mysql command to display data with m:n relationship?</p>
  
  <p>i can use join to display a 1:n relationship, but when constructing m:n relationship, another table is created and when i try to do the same it, it only show one table plus the relationship table. </p>
  
  <p>For example, I have :</p>
  
  <p><strong>table A:</strong></p>
  
  <ul>
  <li><code>A_id</code></li>
  <li><code>A_data</code></li>
  </ul>
  
  <p><strong>table B:</strong></p>
  
  <ul>
  <li><code>B_id</code></li>
  <li><code>B_data</code></li>
  </ul>
  
  <p><strong>table C:</strong></p>
  
  <ul>
  <li><code>A_A_id</code></li>
  <li><code>B_B_id</code></li>
  </ul>
  
  <p>I can display the table such that i have</p>
  
  <pre><code>A_id | A_data | A_A_id | B_B_id
  </code></pre>
  
  <p>with some data.</p>
  
  <p>but the format that i want is </p>
  
  <pre><code>A_id | A_data | B_id | B_data
  </code></pre>
  
  <p>where <code>A_id</code> corresponds to <code>B_id</code> in table C.
  I'm doing this through foreign key reference, with InnoDB engine of MySQL.</p>
  
  <p>thanks</p>