Hi guys,
Currently I have student's management database project going on. For a page which "list all students" I would wanna do a
However each student has 1 or more subjects he/she can take. So I would like to also display the subjects in the "list all students" page, in a comma-delimited form
ie: "Maths, English, Science"
In the case of joining the tables, i can simply join based on the student_id field, but that will give me more than 10 records if i had 10 students in the database. How will I go about joining and grouping them so that i have something like this:
Many Thanks!
Currently I have student's management database project going on. For a page which "list all students" I would wanna do a
Code:
SELECT * FROM tbl_students
ie: "Maths, English, Science"
In the case of joining the tables, i can simply join based on the student_id field, but that will give me more than 10 records if i had 10 students in the database. How will I go about joining and grouping them so that i have something like this:
Code:
id name subjects 1 John English, Maths 2 Doe Science, English
Comment