Making tree menu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux