I need help with DISTINCT. I would like to display Distinct row but display also all rows
Example this table from database:
+----+-----+-----+
|col1|col2 |col3 |
+----+-----+-----+
|A |one |two |
|A |three|four |
|A |five |six |
|B |seven|eight|
|B |nine |ten |
+----+-----+-----+
I would like the display to look like this :
A
one |two
three|four
five |six
B
seven|eight
nine |ten
Can anyone help?
The easiest way would be to fetch all rows from the database, and then group them in PHP.
Yields:
Note that I use the deprecated mysql_functions just for simplicity, do not use them in production.