Hi guys, sure one of you clever sods can make me feel dumb with this one 
I need t be able to move a branch of a tree. That branch may also have branches so clearly I can't move the parent branch to one of it's child branches and I wouldn't want it to be it's own parent!
If someone could help me with a little pseudo-code or just a pointer in the right direction that'd be great. Heres the example:
id|parent|name
1|0|great grandma
2|1|grandma
3|1|grand_pa
4|3|father
5|4|son
Thanks
Nick

I need t be able to move a branch of a tree. That branch may also have branches so clearly I can't move the parent branch to one of it's child branches and I wouldn't want it to be it's own parent!
If someone could help me with a little pseudo-code or just a pointer in the right direction that'd be great. Heres the example:
id|parent|name
1|0|great grandma
2|1|grandma
3|1|grand_pa
4|3|father
5|4|son
Thanks
Nick