title: Mysql ID seperated by comma with join
body: <pre><code>SELECT
  p.products_id as ArtID,
  p.products_model as Artikelnummer,
  p.products_id as ArtID,
  p.products_ean as EAN,
  p.products_sort as &quot;Master Sort&quot;,
  p.products_master_slave_order as &quot;Int. Sort&quot;,
  d.products_name as Artikelname,
  d.products_short_description as Kurzbeschreibung,
  d.products_description as Beschreibung,
  u.url_text as url_text,
  FORMAT(p.products_vpe_value,1) as VPE,
  CONCAT(FORMAT(p.products_price,2),&quot; EUR&quot;) as &quot;VK Netto&quot;,
  FORMAT(p.products_weight,3) as Gewicht,
  p.products_shippingtime as Lieferzeit,
  p.products_image as Bild1,
  GROUP_CONCAT(c.categories_id ORDER by 'p.products_id' SEPARATOR ',') as Kategorie,
  p.products_status as Status,
  p.disabled_shippings as Spedition,
  d.products_keywords as &quot;Keyword Suche&quot;,
  u.meta_title as &quot;Meta Title 55-60&quot;,
  u.meta_description as &quot;Meta Description 150&quot;
  FROM
  xt_products p
  left join xt_products_description d on p.products_id = d.products_id
  left join xt_products_to_categories c on p.products_id = c.products_id
  left join xt_seo_url u on p.products_id = u.link_id AND u.link_type = 1
  </code></pre>
  <p>with this statement I export a csv file with phpmyadmin. This works fine but my fail is:</p>
  <pre><code>GROUP_CONCAT(c.categories_id ORDER by 'p.products_id' SEPARATOR ',') as Kategorie,
  </code></pre>
  <p>Now it write all c.categories_id for the products_id in first row:</p>
  <pre><code>503 | 784,783,782,780,775,769,765,764,763,589,586,585,57...
  </code></pre>
  <p>but it would be great to have the c.categories_id comma separated for products_id:</p>
  <pre><code>503 | 784,783,
  504 | 10,15,20
  505 | 25,58,69
  </code></pre>
  <p>It would be great someone has a idea.</p>
  <p>Thank you
  Silvio</p>