I have
Brad, boy
Dave, boy
Kathrin, girl
Sabrina, girl
I want to show them in acp like prefixes with prefixe_groups.
Boys
Girls
Should i fetch all names and group them into arrays
1.
fetch data
=> foreach
if group == boy => to array boys
if group == girls=> to array girls
or
2.
fetch data grouped bymysql left_join with data from table goup?
But then i have a lot of not needed data in a row like
Brad, boy, goupd_id, some more group_stuff
Dave, boy, goupd_id, some more group_stuff
or
3. fetch my groups
foreach group => fetch names
or
4.
fetch names (grouped or not?)
fetch groups
push data to
groups[] => names
------------------------------
and then in template
foreach loop groups
=> foreach loop group.names
I will try to find the prefix_stuff ...
Brad, boy
Dave, boy
Kathrin, girl
Sabrina, girl
I want to show them in acp like prefixes with prefixe_groups.
Boys
- Brad
- Dave
Girls
- Kathrin
- Sabrina
Should i fetch all names and group them into arrays
1.
fetch data
=> foreach
if group == boy => to array boys
if group == girls=> to array girls
or
2.
fetch data grouped bymysql left_join with data from table goup?
But then i have a lot of not needed data in a row like
Brad, boy, goupd_id, some more group_stuff
Dave, boy, goupd_id, some more group_stuff
or
3. fetch my groups
foreach group => fetch names
or
4.
fetch names (grouped or not?)
fetch groups
push data to
groups[] => names
------------------------------
and then in template
foreach loop groups
=> foreach loop group.names
I will try to find the prefix_stuff ...