[eluser]xwero[/eluser]
The group by in the statement compacts the group to one line so the result you get will be the last row that is fetched from the database. table:
Code:
number name
1 me
1 I
sql statement : SELECT * FROM users GROUP BY number, outputs
You need to query the database twice, first to get the group data and then to get the group item data.
You can do it in one query if the group data is in each group item row using ORDER BY. But then your resultset can be significantly bigger and you have to do the grouping in php.