Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tree navigation

Status
Not open for further replies.

letimati

Technical User
Feb 3, 2006
36
0
0
GB
Hi there i have a tree structure navigation for a web site i am building, each page has an id, a parent_id and name. i am looking for a way given one name that i can get the tree to the root page.

a simple excample will help me explane better.

page table

id | parent_id | name
1 0 home
2 0 about
3 2 site
4 2 company
5 4 location

so now if i had the name location i want to use a query that would return 4, 2, 0 which would represent the tree to that node

thanks in advance for any help

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top