A little late in the discussion, but what are you trying to sort by?
If is it category, how about this?
SELECT child.category, COUNT(child.lft) AS lvl, child.lft, child.rgt,
child.categoryid
FROM category parent, category child
WHERE child.lft BETWEEN parent.lft AND parent.rgt
GROUP BY child.lft, child.rgt, child.category, child.categoryid
ORDER BY lvl, child.category
Janet.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

