How do i keep track of parents and children?
I want to know how many children I have, and how many grandchildren I have, and then, also how many grand-grand-children i have, and finally, how many grand-grand-grand-children I have.
The table is simple, where every person has an TINYINT which identifies whom the (single) parent is, e.g. I can see that MY parent is "123". My own id is "345", so my children will each have their "parent" set to "345".
So every person has an "id", and a "parent", both TINYINTs.
I want a PHP line to echo "You parent is "John" and his number is "123". You have X children, X grandchildren, X g-grandchildren, and X g-g-grandchildren."
Much appreciated!