1. There is a col data table, which has 3 fields, one is name, the other is own id, and the third is husband id.
As follows: The horizontal bar s indicates that it is a child of certain data.
<code>{'a','3','2'} {'a-s','4','3'} {'a-s','5','3'} {'a-s-s','6','5'} {'a-s-s','7','4'} {'b','8','2'} </code>
Now if I retrieve the child item through the parent id, I don’t know why I can’t go back to the parent item from the child item.
The general idea is that I obtained a string of data corresponding to son (such as ‘a-s’) through the id (3) in a. The data corresponding to son contains the record parent id (3). I use this parent id (3) to find the pid (2) with id=3 in the database, and then return the son data (a and b) with the parent id of 2.
But for some reason it seems that if there are too many levels, it will get messy.
1. There is a col data table, which has 3 fields, one is name, the other is own id, and the third is husband id.
As follows: The horizontal bar s indicates that it is a child of certain data.
<code>{'a','3','2'} {'a-s','4','3'} {'a-s','5','3'} {'a-s-s','6','5'} {'a-s-s','7','4'} {'b','8','2'} </code>
Now if I retrieve the child item through the parent id, I don’t know why I can’t go back to the parent item from the child item.
The general idea is that I obtained a string of data corresponding to son (such as ‘a-s’) through the id (3) in a. The data corresponding to son contains the record parent id (3). I use this parent id (3) to find the pid (2) with id=3 in the database, and then return the son data (a and b) with the parent id of 2.
But for some reason it seems that if there are too many levels, it will get messy.