Question

I read this http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/ and in nested set model I want retrieve from parent node"portable electronics" only direct child "mp3 players" "cd players" "2 ways radios". How can I do?

Était-ce utile?

La solution

It's described in the document you linked under the heading Find the Immediate Subordinates of a Node. As you can see it's pretty complex. When I use nested sets I always add a parent field as well, because that makes getting the direct children of a node a lot easier.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top