title: use a mysql query result to do another query
body: <p>I have 2 table table1 contains an userid and a postid.  Table2 contains a userid and a username.  I want to return all the userids with a certain postid and then use those userids to query table2 and get the usernames.</p>
  
  <p>Is there a way to go about this? I have tried join statement and it doesn't seem to work</p>