Navigation problems

Results 1 to 2 of 2

Thread: Navigation problems

  1. #1
    Join Date
    Dec 1969

    Default Navigation problems

    Having a bit of a blank moment, can anyone help me out.<BR><BR>Basically I have a navigation menu that I am building, with 3 levels - toplevel, section and subsection.<BR><BR>Each time a user clicks a link on the new menu, a unique id is passed in the querystring, which could be id, section or subsection respectively.<BR><BR>At the moment I have loads of functions doing individual calls to the db to try and rebuild the navigation but I&#039;m sure I could build the navigation in a much easier way with a view across all 3 tables but can&#039;t seem to get the join correct.<BR><BR>Table Structure:<BR><BR>TOPLEVEL:<BR>TopLevelID<BR>Secti onName<BR><BR>SECTIONS:<BR>SectionID<BR>TopLevelID <BR>SectionName<BR><BR>SUBSECTIONS:<BR>SubSectionI D<BR>SectionID<BR>SubSectionName

  2. #2
    Join Date
    Dec 1969

    Default Sound more like query problem?

    SELECT T.TopLevelID, T.TopLevelName, S.SectionID, S.SectionName, SS.SubSectionID, SS.SubSectionName<BR>FROM Toplevel AS T, Sections AS S, Subsections AS SS<BR>WHERE S.TopLevelID = T.TopLevelID<BR>And SS.SectionID = S.SectionID<BR>ORDER BY T.TopLevelID, S.SectionID, SS.SubSectionID<BR><BR>or, as you choose:<BR><BR>ORDER BY T.TopLevelName, S.SectionName, SS.SubSectionName<BR><BR>*************<BR><BR>And then you just use the techniqes shown here:<BR><BR>to build up the nav menu.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts