title: mysql join with limit 1
body: <p>Suppose I have two tables in one to many relationship.</p>
  
  <p>And, I want to select columns from each main record along with the first record from a related table.</p>
  
  <p>I tried some ways but it just doesn't go...</p>
  
  <p>Here I end up with this SQL fiddle:</p>
  
  <p><a href="http://sqlfiddle.com/#!2/39fdb/3">http://sqlfiddle.com/#!2/39fdb/3</a></p>
  
  <p>The problem there is that it just cannot reference a.ID from a subselect.</p>
  
  <p>This does not work, of course, but it's just all I could think of</p>
  
  <pre><code>select a.*,b.* from event a left join 
  (select * from event_pictures where a.ID=article limit 1)
  b on a.ID=b.article;
  </code></pre>
  
  <p>Any ideas on how to fix it?</p>