oracle8.1.6
select substr(tree_sortkey, 0, 6) as father_tree_sortkey
from forums_messages
where message_id=$message(message_id)
select parent_id
from forums_messages
where forum_id = $message(forum_id) and tree_sortkey between tree.left('$father_tree_sortkey') and tree.right('$father_tree_sortkey')
order by tree_sortkey desc