I am retrieving from table based on standard and date. For first standard It, has two sections A & B. A has one subject and B has two subject. While displaying I want to display in a table like this:

section   |    Description   
  A       |      English
  B       |      French,English

My output is now what I am gettting:

Section | Description
A       |  English
B       |  French
B       |  English

How to solve this?

Hi, try group_concat() with group by:

SELECT group_concat(Description) FROM tablename GROUP BY Section;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.