This probably won't help most people, but if you're using Oracle, they support CONNECT BY which is made specifically to do this sort of thing.
SELECT lpad('-', 3*(level-1)) || pagename FROM tablename START WITH under=0 CONNECT BY PRIOR pageid = undef;
In reply to Re: Cleaner code to build hierarchical display of page names
by jhourcle
in thread Cleaner code to build hierarchical display of page names
by bradcathey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |