SQL resultaat weergeven in 1 rij ipv meerdere rijen.
SELECT phpbbU.username, phpbbU.user_email, phpbbPF.pf_geboortejaar, phpbbPF.pf_groep, phpbbU.user_rank, phpbbG.group_name, joomlaU.username, joomlaG.group_id
FROM phpbb_users AS phpbbU
INNER JOIN phpbb_user_group AS phpbbUG ON phpbbU.user_id = phpbbUG.user_id
INNER JOIN phpbb_groups AS phpbbG ON phpbbUG.group_id = phpbbG.group_id
INNER JOIN phpbb_profile_fields_data AS phpbbPF ON phpbbU.user_id = phpbbPF.user_id
INNER JOIN jml17_users AS joomlaU ON phpbbU.username = joomlaU.username
INNER JOIN jml17_user_usergroup_map AS joomlaG ON joomlaU.id = joomlaG.user_id
WHERE username_clean = 'bluestrike'
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
SELECT phpbbU.username, phpbbU.user_email, phpbbPF.pf_geboortejaar, phpbbU.user_rank, , joomlaU.username,
GROUP_CONCAT( phpbbPF.pf_groep) AS groepenP,
GROUP_CONCAT(phpbbG.group_name) AS groepenJ
FROM phpbb_users AS phpbbU
INNER JOIN phpbb_user_group AS phpbbUG ON phpbbU.user_id = phpbbUG.user_id
INNER JOIN phpbb_groups AS phpbbG ON phpbbUG.group_id = phpbbG.group_id
INNER JOIN phpbb_profile_fields_data AS phpbbPF ON phpbbU.user_id = phpbbPF.user_id
INNER JOIN jml17_users AS joomlaU ON phpbbU.username = joomlaU.username
INNER JOIN jml17_user_usergroup_map AS joomlaG ON joomlaU.id = joomlaG.user_id
WHERE username_clean = 'bluestrike'
GROUP BY
phpbbU.username,
phpbbU.user_email,
phpbbPF.pf_geboortejaar,
phpbbU.user_rank,
joomlaU.username
GROUP_CONCAT( phpbbPF.pf_groep) AS groepenP,
GROUP_CONCAT(phpbbG.group_name) AS groepenJ
FROM phpbb_users AS phpbbU
INNER JOIN phpbb_user_group AS phpbbUG ON phpbbU.user_id = phpbbUG.user_id
INNER JOIN phpbb_groups AS phpbbG ON phpbbUG.group_id = phpbbG.group_id
INNER JOIN phpbb_profile_fields_data AS phpbbPF ON phpbbU.user_id = phpbbPF.user_id
INNER JOIN jml17_users AS joomlaU ON phpbbU.username = joomlaU.username
INNER JOIN jml17_user_usergroup_map AS joomlaG ON joomlaU.id = joomlaG.user_id
WHERE username_clean = 'bluestrike'
GROUP BY
phpbbU.username,
phpbbU.user_email,
phpbbPF.pf_geboortejaar,
phpbbU.user_rank,
joomlaU.username
daar kan ik mee verder :)