hi,
how can i make recursive querys in mysql?
i want to show a tree.
my table:
tree (id int, parent int, name char(10));
id parent name
----------------------
1 0 joe
2 1 mike
3 1 jim
4 2 george
5 3 eric
6 4 steven
and i need this result:
id parent name
-----------------------
1 0 joe
2 1 mike
4 2 george
6 4 steven
3 1 jim
5 3 eric
the tree:
1 0 joe
-2 1 mike
--4 2 george
---6 4 steven
-3 1 jim
--5 3 eric
thanks
ati.
---------------------------------------------------------------------
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