No problem
Code:
CREATE TABLE `wats_svn_40`.`jos_whelpdesk_tree` (
`grp` varchar(100) NOT NULL default '',
`type` varchar(100) NOT NULL default '',
`identifier` varchar(100) NOT NULL default '0',
`parent_type` varchar(100) default NULL,
`parent_identifier` varchar(100) default NULL,
`lft` int(11) default NULL,
`rgt` int(11) default NULL,
`description` varchar(255) default NULL,
PRIMARY KEY (`grp`,`type`,`identifier`),
KEY `PARENT` (`parent_type`,`parent_identifier`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
I should point out that this table is designed to hold more than one tree (separated by the grp field). This table is a sort of index for rows held in other tables - the type field identifies the type of node we are talking about.
In terms of alphabetical order I would only ever be extracting a branch that is made up entgirely of the same type of node.
The table also include a refernce directly to the parent node.
Attached is some sample data (was too big to include easily in the message body text).
To be honest i have been looking around teh internet and am thinking that this is no easy task without post processing.