MySQL: Tri GROUP_CONCAT valeurs
En bref: Est-il possible de trier les valeurs dans un GROUP_CONCAT déclaration?
Requête:
GROUP_CONCAT((SELECT GROUP_CONCAT(parent.name SEPARATOR " » ")
FROM test_competence AS node, test_competence AS parent
WHERE node.lft BETWEEN parent.lft AND parent.rgt
AND node.id = l.competence
AND parent.id != 1
ORDER BY parent.lft) SEPARATOR "<br />\n") AS competences
- Je obtenir cette ligne:
De L'Artisanat » Menuiserie
D'Administration De L'Organisation
Je le veux comme ceci:
D'Administration De L'Organisation
De L'Artisanat » Menuiserie
Vous devez vous connecter pour publier un commentaire.
Sûr, voir http://dev.mysql.com/doc/refman/...tions.html#function_group-concat:
order by
dans ungroup_concat
jusqu'à cet instant précis. Résout un problème que j'ai. Merci!Voulez-vous dire de faire une commande?