How to do this MySQL stored procedure for hierarchical query?

Normally, you could use an approach described in this article.

Instead of storing a parent id try representing your tree as a nested set. Give it a left and a right value. Now you have a node A with two children B and C and C has two children, D and E.

Now imagine visiting each node twice and assigning them numbers, once down the left side and once up the right. When you are going up the right and hit a branch, go down it's left. Leaf nodes get two sequential numbers.

Then go back up until you hit the root a second time.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions