title: Select and display all rows belonging to a specific ID
body: <p>I have </p>
  
  <p>Table <strong>student</strong>, <strong>student_subject</strong> and <strong>subject_bsit</strong></p>
  
  <pre><code>      "student"
  -----------------------
  |studentID | FullName |
  -----------------------
  |1234      | John    |
  |1235      | Michael |
  |1236      | Bryce   |
  
          "subject_bsit"
  -----------------------------------
  |subject_id| subject_name  |grade |
  -----------------------------------
  |    1     | Programming   |  3   |
  |    2     | Networking    |  2.5 |
  |    3     | Algorithm     |  1.75|
  |    4     | Physical Educ |  2   |
  
  This is the Junction table to connect the 
  two now.
  
         "student_subject"
  ----------------------------
  | student_id | subject_id |
  ----------------------------
  |   1235     |      1     |
  |   1235     |      2     |
  |   1235     |      3     |
  |   1234     |      1     |
  </code></pre>
  
  <p>As you can see the table ID 1235 is michael  He has three three subjects,  subject_id 1,2 and 3. What I want to do is to display all the subject name and grades of michael in textboxes,  not in a datagrid view. </p>
  
  <p>As of now I still have failed to output it to textboxes. This is my sample query </p>
  
  <pre><code>    sql = "SELECT subject_name " &amp; _
          " FROM student_subject " &amp; _
          " INNER JOIN subject_bsit ON subject_bsit.subject_id = student_subject.sub_id" &amp; _
          " where student_subject.student_id='" &amp; Txtbox.Text &amp; "'"
  </code></pre>
  
  <p>The Txtbox.text in the last query is where the user will input the ID number.</p>
  
  <p>This is my code on displaying the data to the textbox. I don't have any idea or approach on how can i loop on the textbox and display it on each textbox.</p>
  
  <pre><code> cmd = New MySqlCommand(sql, myconn)
      dr = cmd.ExecuteReader
  
      While dr.Read
          TextBox1.Text = dr.Item("subject_name").ToString
          TextBox2.Text = dr.Item("subject_name").ToString
      End While
  </code></pre>
  
  <p>This is the sample User Interface of what i am trying to achieve. Thank you so much.</p>
  
  <p><a href="https://i.stack.imgur.com/IlGyv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IlGyv.png" alt="enter image description here"></a></p>