We overcame that problem to infinite levels with our Blog Software.  Instead
of loops we use "Anchor Points" in the url to tell the navigation where it
was at all times.  This allows for a more dynamic navigation system as you
can have Nav trees that not Expand with more subcatorgies but also collapse
back into a single point.

Example

http://mydomain.com/CAT1/CAT2/CAT3/CAT4/ARTICLE1.html

Now You have also a tree like
http://mydomain.com/CAT1/CAT4/Article1.html
http://mydomain.com/CAT1/CAT3/Article1.html

There is no duplication of data but Say a privacy policy or Contact info
page that needs to be everywhere doesn't need multiple links in the db to
make it happen because we are looking at two anchor points.

CAT1 and Article1.html  What's in the middle doesn't matter because the its
not on that page at that time. (YET IT IS IN THE URL)  This means you can
build freely pages without regard to where they need to go or how to move
them later.  As for your Expanding TREE (Like DHTML or JavaScript) for the
next level down to give it a windows appearance.  That would simply be a
matter of calling the next anchor points on mouse over and showing the
display Some javascript(DHTML) and CSS styling).

Its a very complicated Nav system but it allows us to be so versatile when
we decide to use third party programs we can create a Nav structure within
our domain's website that will run it entirely all from a clean interface no
coding required.  Just input urls and hit enter.

Here's some links to our software its free to use but not GPL as we have
done some ground breaking stuff with it.  You may not want to try and
reinvent the wheel when all you need to do is create a CSS style sheet on
our system to do a mouse over menu.

http://www.firebasesoftware.com/firebase_downloads/firebase2.0_client_linux.
zip
http://www.firebasesoftware.com/firebase_downloads/firebase2.0_client_window
s.zip

Thanks
Donny Lairson
President
29 GunMuse Lane
P.O. box 166
Lakewood NM 88254
http://www.gunmuse.com
469 228 2183


-----Original Message-----
From: Celebrity Institute [mailto:[EMAIL PROTECTED]
Sent: Friday, April 08, 2005 1:32 PM
To: mysql@lists.mysql.com
Subject: mysql_query Looping


Hi, just got intro to the list and i hope I can find some help here.

I'm trying to figure out the true syntax of a project im working on,
basicly theirs a menu on my site that has several catagoies and in those
catagories are secondary, and some times 3rd level and 4th level sub
lists, i want to do a on click open up and ive got a good script for on
click fold out lists but its the SQL syntax loops im not sure how to
configure so im trying to figure out at this point how to make a nested
list of the items. Then I'll worry about colasping them.

heres the psudo code im useing as my guide for my layout



Quote
------------------------------------------------------------------------
ADMIN SIDE

Category Tool
We would need to set a order of display for the category, and where its
bound, (main catagoies would be bound to Main Menu, while subs would be
bound to their master).

Code wise we need something like

“if Master = ‘Main Menu’ display these entries order by ‘Order of
display’” for the main link and then to show the sub links we would need
a nested loop to the effect

recursive “if master = Thisentry[x] display these entries order by
‘Order of display’”


1. Beauty and Health
1.1. Cosmetics
1.2. Diet & Nutrition
1.3. Fashion
1.4. Fitness
2. Computer/Electronics
2.1. Software
2.2. Hardware
2.3. Internet
2.4. Photography
2.5. Wireless
2.6. Audio
2.7. Video
3. Home and Child Care
3.1. Art and Decoration
3.2. Career/Work
3.3. Eating And Dinning
3.4. Education
3.5. Gifts
3.6. Household
3.6.1. Bedding
3.6.2. Flooring
3.6.3. Furniture
3.6.4. Houseware/Appliances
3.6.5. Gaardening
3.6.6. Tools
3.7. Pet
3.8. Staffing Services
4. On The Go
4.1. Autos
4.2. Planes
4.3. Travel & Getaways
4.4. Yacts
5. Recreation
5.1. Movies
5.2. Music
5.3. TV
5.4. Radio
5.5. Reading
5.6. Games
6. Services
6.1. Business
6.2. Charities
6.3. Finance
6.4. Insurance
6.5. Legal
6.6. Medical
6.7. Real Estate
7. Shopping (Today’s Special and Hot Stuff sub areas)
7.1. Home
7.2. Apparel and Accessories
7.3. Beauty and Health
7.4. Books, Movies & Music
7.5. Computing and Office
7.6. Gifts, Flowers & Gourmet
7.7. Jewelry & Watches
7.8. Sports & Outdoors
7.9. Toys, Kids & Baby
7.10. A-Z Store Directory
8. Sports
8.1. Clothing and Gear
8.2. Equipment
9. On The Runway
------------------------------------------------------------------------


this is pre-coding im basicly working on my "design documentation" i
know what i want in psudo-code and am trying to figure out what i need
to do in real code to get there.

Basicly i know how i need to set up the DB but am unsure on just how
precisly to properly display that data in a format similar to the one
above where's some titles are sub section of a link or sub sections of a
sub section something to the effect of

    code:
    ------------------------------------------------------------------------

    Link1
    -->Sublink1
    -->Sublink2
    -->Sublink3
    -->Sublink4
    -->-->Sub-sublink1
    -->-->Sub-sublink2
    -->-->Sub-sublink3
    -->Sublink5
    -->Sublink6
    Link2
    Link3
    Link4
    -->Sublink1
    -->Sublink2

    ------------------------------------------------------------------------

Basicly a PHP version of http://advertisementworld.com/main-home.htm the
flash link list there

im not to worried about the links folding out at this point though. I
just want to find a way to get them to auto arrange in the right sequence.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to