co.ador Posted April 19, 2011 Share Posted April 19, 2011 Tree iterating only through specifics Nodes of the tree below The scenario below is a profile based on the tree iteration. Does anybody has any suggestion where to start in the SQL table structure and programming language or languages. Link to comment https://forums.phpfreaks.com/topic/234120-help-with-this-scenario/ Share on other sites More sharing options...
btherl Posted April 19, 2011 Share Posted April 19, 2011 A common structure for a tree with unlimited levels in SQL is to have an id column, and "parent" columns in each row. To find the children of a row X, you select "where parent = X", which will be fast with the parent column indexed. To find the parent of a row you just fetch the parent column directly from that row. Link to comment https://forums.phpfreaks.com/topic/234120-help-with-this-scenario/#findComment-1203340 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.