paganotti
paganotti

Reputation: 5661

get only direct child of node in nested set model

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?

Upvotes: 2

Views: 2358

Answers (1)

Kaivosukeltaja
Kaivosukeltaja

Reputation: 15735

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.

Upvotes: 3

Related Questions