I want to traverse a tree recursively, but I feel that using parentID and ID cannot determine whether there are child nodes and cannot traverse it. I don’t know if I need to add a childrenID field
phpcn_u15822017-05-27 17:43:52
If you only represent a tree, a single table of parentID and ID is enough; it is called: adjacency list.