Are all of the items in your hierarchy one type of data? In other
words, are they all in one table with an association of "has and
belongs to many"?

Ben

On Dec 26, 7:32 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
I have a situation where I know the id of a child, but I need the
parental hierarchy. Using the structure in this (excellent) Bakery
example, I have the following:

1. Art
          1. Film
          2. Music
                    1. Jazz
                    2. Pop
2. History
          1. Archaeology
          2. War
3. Science
          1. Biology
          2. Chemistry
          3. Physics
4. Technology
          1. Computing
                    1. Hardware
                    2. Software
          2. Engineering

In my situation, I know of "Hardware", but I need to know the
following:

4. Technology
          1. Computing
                    1. Hardware

Or if I know of "Physics", I need to know:

3. Science
          3. Physics

Does anyone know how to accomplish this in a Cake-ish way (without
hacking a bunch of queries together in my controller)?

Thanks in advance!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to