display last child
Posted: Sat Jan 27, 2007 9:49 am
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?
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?