Hi there,

I have heard that MySQL has some special functions or it's some other way capable to 
handle hierarchical forms in table. Let me give an example:

Table contains following rows:
ID    Name    ParentID
1    Main1    0
2    Main2    0
3    Main3    0
4    Child1-1    1
5    Child2-1    2
6    Child2-1-1    5

Now I want to get the full path for some of the nodes, for example the node ID 6. The 
result should be following
ID    Name    ParentID
2    Main2    0
5    Child2-1    2
6    Child2-2-1    5

Or just a string "Main2/Child2-1/Child2-2-1"...

Any ideas? Are they just rumours that this cannot be made with MySQL without any 
accessories, PHP etc?

Emm... Hope that you understood. :)

Cheers,
- Ville

.................................................
Ville Mattila
Ikaalinen, Finland

"Ei ne heinäsirkat ole minnekään
kadonneet, ovat lentämässä."
- Jaakko Kuusisto


---------------------------------------------------------------------
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

Reply via email to