title: Convert result from a left join to an array (or json or whatelse)
body: <p>I actually have these tables :</p>
  
  <pre><code>- Table games -
  ID
  Name
  
  - Table ean -
  ID
  ID_games
  EAN
  </code></pre>
  
  <p>And I have this request :</p>
  
  <pre><code>SELECT games.*, ean.EAN
  FROM games
  LEFT JOIN ean ON (games.ID = ean.ID_games)
  </code></pre>
  
  <p>The result will be something like this :</p>
  
  <pre><code>| 1 | Half Life | 358958595 |
  | 1 | Half Life | 589584859 |
  | 2 | Half Life 2 | 385953684 |
  | 2 | Half Life 2 | 585100335 |
  etc.
  </code></pre>
  
  <p>When I do my request and use it in php, it is not useful to have a lot of line with about the same results. I would like to do something like this :</p>
  
  <pre><code>SELECT games.*, ConvertToArray(ean) AS ean_array
  FROM games
  LEFT JOIN ean ON (games.ID = ean.ID_games)
  </code></pre>
  
  <p>And have results like this :</p>
  
  <pre><code>| 1 | Half Life | (358958595,589584859) |
  | 2 | Half Life 2 | (385953684,585100335 ) |
  etc.
  </code></pre>
  
  <p>Is it possible to that with mysql ? Without an UDF ? And with an UDF ?</p>
  
  <p>Thank you,
  Kevin</p>