MY tables..
articles fields:
- id
- name
cats fields:
- id
- name
article_cats fields:
- id
- article_id
- cat_id
I have this sql:
SELECT
a.id AS article_id ,
a.name AS article_name ,
COUNT( c.id ) AS num_categories ,
GROUP_CONCAT( c.name ) AS categorie_names
FROM
articles AS a
LEFT JOIN
article_cats AS ac
ON
( a.id = ac.article_id )
LEFT JOIN
cats AS c
ON
( ac.cat_id = c.id )
GROUP BY
a.id
and it provide this table structure:

what i need is, to get categories id and name in array, so categorie_names will be an array with fields cat_id and cat_name for each category.
Is this possible with mysql ?