Jarvis
24th March 2010, 14:32
Hi everyone !
I have a very simple table Classes containing three fields: id, id_parent and description, with id_parent relating to id on the same table. I would like to see its content as a tree nodes view. Example :
[id]; [id_parent]; [description]
1; NULL; Drinks
2; 1; Soft drinks
3; 1; Beers
4; 1; Whiskeys
5; NULL; Food
6; 5; Breakfast
7; 5; Beef
8; 5; Fish
That's it; Soft drinks, Beers and Whiskeys are sub-nodes of Drinks which is a root item. Is there a quick and simple way to create a model that could be set to the view so that items would be displayed automatically ?
Many thanks for you help !
Cheers.
I have a very simple table Classes containing three fields: id, id_parent and description, with id_parent relating to id on the same table. I would like to see its content as a tree nodes view. Example :
[id]; [id_parent]; [description]
1; NULL; Drinks
2; 1; Soft drinks
3; 1; Beers
4; 1; Whiskeys
5; NULL; Food
6; 5; Breakfast
7; 5; Beef
8; 5; Fish
That's it; Soft drinks, Beers and Whiskeys are sub-nodes of Drinks which is a root item. Is there a quick and simple way to create a model that could be set to the view so that items would be displayed automatically ?
Many thanks for you help !
Cheers.