Lionel
12-20-2005, 12:07 AM
I've got 32 world cup teams separated in 8 groups of 4
I am trying to display them by group
But the below query returns only the last group. When I remove the GROUP BY clause, they all display
$currentteams = $DB_site->query("
SELECT *
FROM " . TABLE_PREFIX . "cclpinternational_teams
WHERE disabled=1 AND name!='divadmin' AND division='$thedivision'
GROUP BY 'groupname'
ORDER BY name
");
What else one must know in order to get GROUP BY to display as needed?
I am really stucked. Can someone please give me a hint on how to proceed?
I managed the Group By clause to display how I wanted. However, while there is more than one element per group (in that case it should be four), it displays only one.
It consists of 8 groups with 4 teams each. I was hoping to be able to display all in same group together. I tried GROUP_CONCAT but that gives me an error.
I am trying to display them by group
But the below query returns only the last group. When I remove the GROUP BY clause, they all display
$currentteams = $DB_site->query("
SELECT *
FROM " . TABLE_PREFIX . "cclpinternational_teams
WHERE disabled=1 AND name!='divadmin' AND division='$thedivision'
GROUP BY 'groupname'
ORDER BY name
");
What else one must know in order to get GROUP BY to display as needed?
I am really stucked. Can someone please give me a hint on how to proceed?
I managed the Group By clause to display how I wanted. However, while there is more than one element per group (in that case it should be four), it displays only one.
It consists of 8 groups with 4 teams each. I was hoping to be able to display all in same group together. I tried GROUP_CONCAT but that gives me an error.