I start at the end:
in a template i would like to do:
foreach $forums as $forum
show node.title
foreach $threads as $thread
show thread
i can fetch my threads, my forums (some threads have node_id not in the list of forums!)
i can fetch threads with forum
I can use sql and group by node_id, but for what?
I dont know how to group in a result (there is one sentence about in the docs)
Should i produce a new array with
nodes = [
node_id1
=> node_title
=> threads => (thread_id) => thread
node_id2
=> node_title
=> threads => (thread_id) => thread
What is the best way with
forum1, forum2
thread (forum1)
thread (forum2)
thread (forum3)
to have:
forum1
thread
-----------
forum2
thread
-----------
rest of threads not in forum1 or 2