Making tree menu
| From: | Daniel Harik | Date: | Thu, 20 Mar 2003 09:17:39 +0000 |
| Subject: | Making tree menu | ||
| Groups: | php.db php.general | ||
| Request: | Send a blank email to php-db+get-26497@lists.php.net to get a copy of this message | ||
Hello guys
I make following query:
mysql> SELECT b.type, a.link AS parent_link, b.link AS child_link FROM
bookmarks AS a, bookmarks AS b WHERE a.id = b.parentid order by
parent_link;
and here is result
+--------+-------------+------------------------+
| type | parent_link | child_link |
+--------+-------------+------------------------+
| link | MAIN FOLDER | http://www.ee/ |
| folder | MAIN FOLDER | SUBFOLDER |
| link | MAIN FOLDER | http://www.google.com/ |
| link | SUBFOLDER | http://www.amazon.com/ |
+--------+-------------+------------------------+
I just can't figure out how can i produce tree style output with php
MAIN FOLDER ->
-> http://www.google.com/
-> http://www.ee/
-> SUBFOLDER
-> http://www.amazon.com/
Any help would be greatly apreciated.
Have a nice day.