tags:

views:

69

answers:

0

Hello,

I'm looking for a SQL example to sort a tree, ordered by nearest node, using nested set tree method or a low ressource method.
The tree I want to sort :

  A  
  /\  
 B  C  
 /\  
D  E  
   /\  
  F  G  

The sort result I'd like to have if I choose for example the E node :
E-B-F-G-A-D-C for a "father priority" or
E-F-G-B-D-A-C for a "child priority".

Thank you very much for your help !