title: MySQL : Multiple row as comma separated single row
body: <p>I have two tables : DISH and DISH_HAS_DISHES. Dish table has all the dishes and "Dish_has_dishes" table has a one-to-many relationship with "Dish" table. I.e. a dish can have multiple dishes. For example</p>
  
  <p><strong>DISH</strong> : </p>
  
  <pre><code>dish_id   dish_name
  1         dish_1
  2         dish_2
  3         dish_3
  4         dish_4
  </code></pre>
  
  <p><strong>DISH_HAS_DISHES</strong> :</p>
  
  <pre><code>meal_id   dish_id
  1         2
  1         3
  1         4
  </code></pre>
  
  <p>Here meal_id and dish_id both are IDs from DISH table. Now I want a format like this:</p>
  
  <pre><code>meal_id     dish_ids     dish_names
  1           2,3,4        dish_2, dish_3, dish_4
  </code></pre>
  
  <p>That is comma separated dish id and names for each meal. How to do that?</p>