Hello,
I would like to create a query:
From each teacher I want to show all his courses with the urls of the courses.
If I query the course name or ID for the courses, there is a difference of the result. As soon as I use Group_Concat or concat not all courses are displayed. Are there any restrictions on the number of characters here?
SELECT concat (u.firstname, " ", u.lastname) as trainer,
GROUP_CONCAT(c.fullname, ' </br>') as course, # incomplete list of courses
GROUP_CONCAT(c.id, ' </br>') as course2, # complete list of course-ids
u.auth
FROM prefix_course AS c
JOIN prefix_context AS ctx ON c.id = ctx.instanceid
JOIN prefix_role_assignments AS ra ON ra.contextid = ctx.id and ra.roleid= 3
JOIN prefix_user AS u ON u.id = ra.userid
Group BY u.id