0

How can I display names from my database adding their first letter as the title of section that appear only once?

I want to display names from my database sorted depending on their last name, I was able to do it but Im having trouble displaying their heading once instead of getting output like this: A Amazon April Art B Bach Bacon Beef I do receive output like this one: A Amazon A April A Art B Bach B Bacon B Beef

23rd Aug 2021, 7:01 PM
Jan Patrick Urbano
Jan Patrick Urbano - avatar
2 ответов
+ 2
You could probably do something like this with ROLLUP and GROUPING https://www.mysqltutorial.org/mysql-rollup/
23rd Aug 2021, 7:49 PM
Tibor Santa
Tibor Santa - avatar
0
what is the code that you are typing?
23rd Aug 2021, 7:08 PM
Amaan
Amaan - avatar