Recursive Query with MySQL ?
Basicaly I need to fetch the root parent of any object child. (could be as low as 25 level deep into the tree structure.)
Is there a way to do it in mysql ? I've seen it in SQLServer with the "With" statement.
heres my db columns:
dbID idParent idChild
1 2
1 3
2 4
2 5
4 6
For example, I need to query to return 1 if I look for idChild = 6
thanks
__________________
I have nothing to advertise ... yet.
|