print hierarchy data(adjacency list model) in a list(ul/ol/li)
- by adi
I have adjacency list model like on the page
http://dev.mysql.com/tech-resources/articles/hierarchical-data.html
i have make a full table containing all data ordered by level using this
SELECT t1.name AS lev1, t2.name as lev2, t3.name as lev3, t4.name as lev4
FROM category AS t1
LEFT JOIN category AS t2 ON t2.parent = t1.category_id
LEFT JOIN category AS t3 ON t3.parent = t2.category_id
LEFT JOIN category AS t4 ON t4.parent = t3.category_id
WHERE t1.name = 'ELECTRONICS';
ORDER by .....
I want to make an unordered list using php from the table
Anyone can help me...