php - Database: Sorting hierarchical data (Modified Preorder Tree Traversal): How to retrieve immediate children -
I am using MySQL with PHP; Principle 2. My question is assume that I am using it, is there any way I can only get immediate children? In addition to LFT and RGT values, you can also store the original ID of each child.
One advantage of doing this is that if you have a problem with your LFT and RGT values then you can make the tree again. This allows you to set up immediate children's parental nodes right away.
Comments
Post a Comment