Quick searches of Google and the MySQL page didn't turn up anything, so I'll ask here..
Here's what I have:
I have a table that among others, have fields called 'section_id' and 'parent_id'. The
section_id is the id of the "self" section, and the parent_id is the id of the section
that "owns" the self section. (It's sort of like a filesystem where one directory has
subdirectories, and so on)
Here's what I'm trying to do:
I want to start with one section, and go down the tree of sub-sections, picking up
information about them on the way.
Example:
I want to start at the "root" section, and follow down one of it's sub-sections.
(Root)
|
|--- Sports Products
| |
| |--- Golf :: Item1, Item2, Item3, Item4
| |
| |--- Fishing :: Item5, Item6, Item7, Item8
So it will start at Root, find that Sports Products is attached to Root, get the
information I want from Sports Products, then it will find that Golf and Fishing are
attached to Sports Products, and get the information from them respectively. (And so
on) As it stands, it won't go any further than 2 levels deep from the root section, so
I won't need to find a more effecient way to organize the relationships for now.
What do you all feel would be the best way to do this?
--
Isaac Force [EMAIL PROTECTED]
(503)656-2489 http://gorgonous.dhs.org
Real Users find the one combination of bizarre
input values that shuts down the system for days.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php