How to list all the records from this mysql table.it has main categories and subcategories, wich are identified by parent id and how deep they go.I am using php mysql.So how can i list them where each child is listed under parent id. like a tree menu right.tbl categories-----------------------------------------------------| id | cat_name | parent_id | depth |------------------------------------------------------| 1 | Mobiles | 0 | 0 |-------------------------------------------------------| 2 | Computers | 0 | 0 |-------------------------------------------------------| 3 | Nokia | 1 | 1 |-------------------------------------------------------| 4 | Motorola | 1 | 1 |-------------------------------------------------------| 5 | N70 | 3 | 2 |-------------------------------------------------------| 6 | KRZR | 4 | 2 |-------------------------------------------------------| 7 | Acer | 2 | 1 |-------------------------------------------------------| 8 | IBM | 2 | 1 |-------------------------------------------------------| 9 | TravelMate | 7 | 2 |------------------------------------------------------| 10 | ThinkPad | 8 | 2 |-------------------------------------------------------

Questions by prawyn_4983

 

This Question is not yet answered!

 
 

Related Answered Questions

 

Related Open Questions