Does anyone have the magic sql to get pagination working with
1 - parent
1.1 - response
1.1.1 - response to response
1.2 - response
2 - parent
2.1 - response
etc… up to the first 20 or so.
It seems easy to get from a parent to all children, but to say get the
20 parents and children is really hard for me to get my head around. I
imagine getting them all back and then looping through in memory but to
them all neatly in a sql call I cannot figure out.
Any advice? I have currently just used an ajax call with a little “+” to
the children to draw and this works - but to give an option to have them
expanded would be nice also.
(the code is available at svn://svn.projectlounge.com/open/light - see
discussion forum and posts model)