title: get name from one table with match id in another table?
body: <p>I don't know how to solve this problem:</p>
  
  <p>I have two tables </p>
  
  <p>1st table :</p>
  
  <p>register</p>
  
  <pre><code>=====================================================
  ID       NAME    Mailid      Subject_id    username..password etc
  -----------------------------------------------------
  34       John     xx          1             xxx
  17       Mike    xxx          2             xxx
  5        Alan    xxx          4             xxx
  10       Dave    xxxx         3             xxxx
  </code></pre>
  
  <p>2nd table </p>
  
  <pre><code>subject_id      subject       
    1              maths    
    2              science
    3             chemistry
    4              physics
  </code></pre>
  
  <p>and I want to get result like this </p>
  
  <pre><code>ID       NAME    Mailid      Subjectname    username..password etc
  -----------------------------------------------------
  34       John     xx           maths              xxx
  17       Mike    xxx          science             xxx
  5        Alan    xxx          physics            xxx
  10       Dave    xxxx         chemistry          xxxx
  </code></pre>
  
  <p>Instead of subject id, I want subject name.</p>