title: Can I concatenate multiple MySQL rows into one field?
body: <p>Using <code>MySQL</code>, I can do something like:</p>
  
  <pre><code>SELECT hobbies FROM peoples_hobbies WHERE person_id = 5;
  </code></pre>
  
  <p><strong>My Output:</strong></p>
  
  <pre><code>shopping
  fishing
  coding
  </code></pre>
  
  <p>but instead I just want 1 row, 1 col:</p>
  
  <p><strong>Expected Output:</strong></p>
  
  <pre><code>shopping, fishing, coding
  </code></pre>
  
  <p>The reason is that I'm selecting multiple values from multiple tables, and after all the joins I've got a lot more rows than I'd like.</p>
  
  <p>I've looked for a function on <a href="http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat-ws" rel="noreferrer">MySQL Doc</a> and it doesn't look like the <code>CONCAT</code> or <code>CONCAT_WS</code> functions accept result sets.</p>
  
  <p>So does anyone here know how to do this?</p>