Well, the group doesn't seem to be functional anymore.  I found
something that looks helpful in case someone stumbles across this
during a search for the same problem:

http://www.sitepoint.com/article/hierarchical-data-database

Cheers.

On Nov 18, 3:04 pm, Ben Hallert <[EMAIL PROTECTED]> wrote:
> Hello!
>
> I've got a database logic problem and I'm trying to figure out a way
> to offload the hard work to MySQL for performance reasons.  The basic
> issue is that I want to have an arbitrarily recursive set of tags.  My
> current schema is real simple, basically this:
>
> int,tag_id
> int,tag_parent
> varchar,tag_name
>
> So each tag would have a tag_id and reference another pre-existing tag
> as the tag_parent (tag_parent is just another tag_id).
>
> If I wanted to represent this as a hierarchical view, the only option
> I can think of to do the actual processing loop is something daft like
> dumping the entire contents of the table to an array, then looping
> through it and building the hierarchy.  The downside, of course, is
> that I'm performance bound by a PHP loop.
>
> So what brings me here is the thought that if I could take advantage
> of MySQL performance optimizations to figure out a way to output the
> data in a more structured manner (so that I could just focus on
> display in my PHP instead of the actual processing), it'd be a win.
>
> Has this problem been solved in MySQL?  Is there functionality that
> can help out with this?  Or is this trying to use a fighter plane to
> pick oranges?
>
> Thanks!
>
> Ben
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "PHP 
& MySQL" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/phpmysql?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to