Page 1 of 1

display last child

Posted: Sat Jan 27, 2007 9:49 am
by Think Pink
I was wondering if there is a way to diaply the last child from a tree

for example this table
treeId | parent | title
1 | null | menu 1
2 | null | menu 2
3 | 1 | submenu 1.1
4 | 3 | submenu 1.1.3.1
5 | 4 | submenu 1.1.3.4.1
..........
150 | 1 | submenu 1......

the output
menu 1
» submenu 1.1
» »submenu 1.1.3.1
» » »submenu 1.1.3.4.1
» » » »submenu 1.....
menu 2

if there a way to display the last child of menu 1?

Posted: Sat Jan 27, 2007 9:55 am
by feyd
The table design you've chosen forces you to query again for additional children.

Posted: Sat Jan 27, 2007 7:47 pm
by Think Pink
I thought so.
thx anyway for your reply. This post may be deleted if you think so.