title: SQL with limit by result
body: <p>I am making a simple chat, and need a way to get only 10 "messages" pr. conversation, but can't figure out how to do so.</p>
  
  <p>This is what i already have tried.
  my SQL:</p>
  
  <pre><code>SELECT c.* FROM chat c
  INNER JOIN users su ON su.id = c.sender_user_id
  INNER JOIN users ru ON ru.id = c.receiver_user_id
  WHERE sender_user_id='1234' OR receiver_user_id='1234'
  ORDER BY created ASC
  </code></pre>
  
  <p>Now i get ALL the messages for user ID 1234 ... BUT i only want 10 messages pr. conversation.</p>
  
  <p>Hope it make sense</p>