I have something like:
1 | 0 | 0 | First level
2 | 1 | 1 | Second level
3 | 2 | 2 | Third level
Now i need:
1. select Name, FatherID from cat where ID = 3;
then
2. select Name, FatherID from cat where ID = result from 1
then
3. select Name from cat where ID = result from 2
to show:
Name Level 0 > Name Level 1 > Name Level 2
For shure something like this should be in GT and will search for it in a minute, but maybe someone knows an easier query for me than this three ones?
Code:
ID | FatherID | Deep | Name 1 | 0 | 0 | First level
2 | 1 | 1 | Second level
3 | 2 | 2 | Third level
Now i need:
1. select Name, FatherID from cat where ID = 3;
then
2. select Name, FatherID from cat where ID = result from 1
then
3. select Name from cat where ID = result from 2
to show:
Name Level 0 > Name Level 1 > Name Level 2
For shure something like this should be in GT and will search for it in a minute, but maybe someone knows an easier query for me than this three ones?