Treeset data structure stored in SQL tables

par cctan
Image introuvable

Once a stackoverflow user asked this: I have a table containing a column named parent which is able to store a parent ID. This makes it possible to create a tree-structure of my data. Are there any good helper-functions for travelling through such a tree-structure in MySQL? For example, if I have a row in my table and I want to be able to retreive all "parents" above it. So getting the it's parent's parent ID and so on...

image of username cctan Flag of Malaysia Penang, Malaysia

Me concernant

IoT systems programmer by day, AI code tinkering at night.

$25 $ US / h