I want to remove group_concat to list each one separately, any tips?
SELECT
U.login,
(SELECT Group_concat(AC.curso ORDER BY id ASC)
FROM alunos_cursos AC
LEFT JOIN cursos C
ON AC.curso = C.id
WHERE AC.aluno = U.id
AND AC.disponivel = 1
AND AC.curso <> 9) CURSOS
FROM usuarios U
Where NIVEL_ACESSO=0
Example:
From
LOGIN CURSOS
1 100, 112, 12, 43, 3
2 9, 25, 6, 78, 44, 70
To
LOGIN CURSOS
1 100
1 112
1 12
1 43
1 3
2 9
2 25
[...]