Results 1 to 12 of 12
Thread: menu unlimited levels ?
Feb 21, 2006, 15:49 #1
- Join Date
- Jul 2004
- 0 Post(s)
- 0 Thread(s)
menu unlimited levels ?
What would be the best way to retrieve a menu structure with all the childeren?
I have a column in the database like
id | parent_id | name 1 animals 2 1 cows 3 1 birds 4 3 eagles 5 3 sparrows
All i can think off right now is to get all items then create a function to loop every item.. then do a query on every item to see if any rows have the same with parent id as it's own id.. and do the same again for that child. But that would require me to do many queries if the menu would grow large. Does anybody have any suggestions, example's, ideas to create this in a cleaner way ?Go visit my site :-D you know you want to ;-)