olk
-
Posts
2 -
Joined
-
Last visited
Posts posted by olk
-
-
Hello Community, maybe I'm a little bit over-worked, but I'm stucked in a problem with recursive database queries.
I have a DB table with from/to relations. Here is an excerpt for only one relation (from rel_item_id_from=3 to rel_item_id_to=3):
rel_id rel_item_id_from rel_item_id_to 1 52 3 2 3 17
My question is: How can I get a recursive solution to get the upward and downward children? It is also possible to have multiple relations (1:n or n:m).
Thanks for your assistance - OLK
Work With Recursive Database Relations
in PHP Coding Help
Posted
Thank you both for these quick and helpful suggestions.
My first goal was to give the heavy work to the Database. Unfortunately I have to dive into the world of "WITH" (CTEs). So I'll try Barands suggestion first.
Wish me luck 😉 and best regards!