i have a problem. I have a element and another list of elements, which are connected to the first one in some way. i want to check, which elements of the list are children of the first. Save the result in an array. Then i will pick the first child and look for his children. save that and so on and on and on. The problem is, i dont know the exact number of relations. so i could have many many loops and searches. do i need to program every single loop and array (to save to) or is there a better way?
EDIT: Iam talking about DB tables. I have two tables. I want to check the children (data in table2) for every element in table1. So i start with a Loop in table1. Elements in Table 1 and table2 are connected with coordinates xy. so iam searching for all elements in table2 where table1_element1.xy == table2.xy. As result there could be n children. Now i want to save them and start for those children a new loop to find for every child his children based on the coordinates. save that new result an so on and on. More clear?
Thank you.