sql - Ordering in a MySQL GROUP_CONCAT with a function in it -


I want to order results in a GROUP_CONCAT function. The problem is that selection in group_concat -function is another function, such as (fictional selection):

  SELECT a.name, GROUP_CONCAT (DISTINCT CONCAT_WS (':', b.id, CNID) order by B.ID ASC. People A, luggage B, course C. Group a.id  

I want to get a result .ID):

  Michael 1: Science, 2: Mathematics, 3: Physical Science  

But I'm getting:

  Michael 2: Mathematics, 1: Science, 3: Physics  

What I Isi can order here in group_concat by anyone know how I b.id?

If someone cares, then I think I have at least one problem Has found a solution. Select 'GROUP_CONCAT' (from the order table of the column name with some columns) '|') where fieldId = p.id

P> This sequence goes according to the group - if there is one then before the separator


Comments

Popular posts from this blog

MySql variables and php -

c# - How can I find out if there are windows above a control? -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -