MySQL Forums
Forum List  »  General

Re: Help Needed to retrieve hierarchical data
Posted by: Peter Brawley
Date: December 16, 2015 11:27AM

If max possible tree depth is known to be N, a query with N-1 joins from menu_id to parent_id can traverse the tree; otherwise you need recursive logic, available in MySQL only in stored routines, see http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html eg listing 7 et seq.

Options: ReplyQuote


Subject
Written By
Posted
Re: Help Needed to retrieve hierarchical data
December 16, 2015 11:27AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.