title: using a limit on one table when joining two tables in mysql
body: <p>How do I correctly write an sql statement using a limit and join in this case?</p>
  
  <pre><code>SELECT  u.userName, u.userFriends, u.userJoined, f.freindName (only 3) 
  FROM    user u inner join friends f ON u.userId = f.addedUserId 
  WHERE   u.userId=1 
  AND     f.userId=1
  </code></pre>
  
  <p>I tried</p>
  
  <pre><code>SELECT  u.userName, u.userFriends, u.userJoined, group_concat(f.freindName) 
  FROM    user u inner join friends f ON u.userId = f.userId 
  WHERE   u.userId = 1 and f.addedUserId = 1 
  GROUP   by u.userName limit 5 /* but this does not work */
  </code></pre>
  
  <p>Can you help with the limiting the <code>f.freindName to 3</code></p>
  
  <pre><code>'gid'  | 'userName'  | 'userId' |   'userFriends'   |'userJoined'
  -------|-------------|----------|-------------------|--------------
  '1'    | 'Jason'     | '1'      |   '5'             |'14-Aug-2014'
  
  
  'gid'  | 'friendName'|  'thisUserId'    |'addedUserId'
  -------|-------------|------------------|-----------------
  '1'    | 'James'     |  '2'             |'1'
  '2'    | 'Lars'      |  '3'             |'1'
  '3'    | 'Kirk'      |  '4'             |'1'
  '4'    | 'Rob'       |  '5'             |'1'
  '5'    | 'Dave'      |  '5'             |'1'
  </code></pre>