On Sun, 28 Jan 2001, Andrei Cojocaru wrote:
> so you want to list all of them starting with the highest level and going
> up to the lowest level?
yes, or vice-versa.
Oliver
>
> On Mon, 29 Jan 2001, Oliver Joa wrote:
>
> > Hi,
> >
> > I have a recursive Problem. I have a Table with columns "id", "name" and
> > "pid". E.g:
> >
> > name1
> > name11
> > name12
> > name121
> > name122
> > name13
> > name2
> > name21
> >
> > In the Table it would look like:
> >
> > id, name, pid
> > 1 name1 0
> > 2 name11 1
> > 3 name12 1
> > 4 name121 3
> > 5 name122 3
> > 6 name13 1
> > 7 name2 0
> > 8 name21 7
> >
> > Is there any select statement, which give me the path e.g to the id 5?
> > I want to provide the 5 and will get the following:
> >
> > id5 (pid3) -> id3 (pid1) -> id1 (pid0)
> >
> > name122 -> name12 -> name1
> >
> > Do you have any idea?
> >
> > Oliver
> >
> >
> >
>
>
--
[EMAIL PROTECTED] * [EMAIL PROTECTED] * [EMAIL PROTECTED] * [EMAIL PROTECTED]
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php