I have a table in MySQL which has group_id and name columns (the table has multiple users divided into groups using group_id).
I want to display these users in the html table using grouping of names.
I used the following MySQL query, but it does not do the job.
SELECT
*
FROM `teams`
WHERE 1
GROUP BY
group_id
What should I do to get the output using PHP and MySQL?