title: mySQL - Nested Select return list?
body: <p>I'm trying to write a bit of mySQL but the brain seems to not be working today. I have two tables, with the following structure.</p>
  
  <p><strong>Table 1 :</strong> 
  id,
  name,
  details</p>
  
  <p><strong>Table 2 :</strong>
  id,
  type,
  value</p>
  
  <p>The id links both tables.</p>
  
  <p>So what I'm trying to do is something like the following, where I return a record based on the results of a nested select.</p>
  
  <pre><code>SELECT * FROM table1 WHERE name = 'someName' AND id = (SELECT id FROM table2 WHERE type = 'type1')
  </code></pre>
  
  <p>Anyone have any ideas?</p>