Problem with Nested Sets

From: loufoque <mat.wilmots.remove_at_nospam.wanadoo.fr>
Date: Tue, 22 Feb 2005 19:09:23 +0100
Message-ID: <421b74bd$0$8368$626a14ce_at_news.free.fr>



Hello,
I have a table which represents a tree of forums using nested sets. Here are the fields: id, root_id, left, right, level, label.

I have a string which is like a path.
For example, Forum/Sub-forum/Sub-sub-forum I want to get the id of the forum from its label and those of its ancestors.

But Forum/Sub-forum/Sub-sub-forum is different than AnotherForum/AnotherSub-forum/Sub-sub-forum.

I would like to know if there was a way to get the id of the forum with as few SQL queries as possible.
Thanks in advance. Received on Tue Feb 22 2005 - 19:09:23 CET

Original text of this message