Quote:
Originally Posted by Spudhead
Is there a way to write an infinitely scaling version of this?
|
nope
what you could to is be practical and write as many LEFT OUTER JOINs as there are levels in your actual data
there are never an "infinite" number, there is always some maximum number of levels, and i have seen tests where 15 joins are handled efficiently, so don't worry about that part of it
as for sorting, you don't actually have to put the subtasks and subsubtasks on the same line with their parents, you can show one task per line, but you do need the joins in order to achieve the proper sorting
give me some sample data for three levels and i'll show you how