I'm trying to find an efficient way to select all dependencies. The idea behind this table is:
- Each taskID is a task that will be display to the user.
- When taskid 22180 is selected by the user and completed it will automatically enable the other tasks (activateTaskId = 22180) to become available to the user hence inactive = 0. Up to that point everything is fine.
- What i need help at is when you have subsequent tasks.
So when taskid (22180) is selected and completed by the user the following tasks become available (22181,22182,22185 and 22186). As you can see if the user selects 22182 then the task dependent on it is 22183 and subsequently 22184 will .
how would i efficiently select all the task that branch off the initial one (22182) no matter how many may exist ?
Thank you