On 11/20/2003 12:28 PM, Ma wrote:
i try to make a clickable menu. it should be outputed as XML. i found a
solution to make it possible to decend only the selected menues. but is
there a easier solution?
my goal is to first show only the first (level=0) level. if the user clicks
on the menu it should select the second (level=1) level, but only from the
menu he clicked. (so HAVING level<=1 doesn't help :( )
does anybody know a solution or a good reference for nested sets?

You may want to try the famous Joe Celko's approach that he described in this book:

Book review: SQL for Smarties

If you do not want to reinvent the wheel, you may want to try this implementation:

Class: Joe Celko Nested Sets


Manuel Lemos

Free ready to use OOP components written in PHP

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to