I have an adjacency list model table with ID and ParentID columns respectively. Both columns are CHAR(32) as required by the client. There is a FK relationship between them.
Unknown depths of descendants. The database is MySQL and the programming is in PHP.
I'm aware that it's probably impossible to get all descendant ID's of a ParentID from a single SQL query. So I've posted this also in the PHP forum to get some guidance on a looping solution.
I need to get the ID's of ALL descendants (children, grandchildren, great-grandchildren, great-great-... etc) from a given ParentID value.