title: mysql select rows based on two columns
body: <p>For example, the table structure is like this:</p>
  
  <pre><code>id   test_id
  1      aaa
  2      b
  3      aaa
  4      b
  5      aaa
  </code></pre>
  
  <p>The question is I do not know the test_id is aaa. All I have is id = 3 and I want to get the result of row 1,3,5 because they all have the same test_id.   Could someone tell me how I can achieve this?  Thanks.</p>
  
  <p>p.s: I do not know how to put the title for this question.  Or maybe is there any duplicates that I couldn't find? Any suggestions?  </p>