Re: Looking for example of a linked list navigation tree
From: Andrew Urquhart (reply_at_website.in.sig)
Date: 04/23/04
- Next message: Ejay Hire: "PHP, IIS 6, and Windows 2003"
- Previous message: Joern Schauermann: "Re: How do I eregi() this?"
- In reply to: T. Relyea: "Re: Looking for example of a linked list navigation tree"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 23 Apr 2004 16:54:18 +0100
*T. Relyea* wrote:
> Actually, there is no limit to the number of children one node can
> have, and no limit to the number of generations.
>
> The problem is that it isn't so much a code thing as a
> database-structure thing. The PHP code reads and displays the
> database information, but the database is where the relationships are
> stored; a snippet of the PHP code without the database structure to
> go along with it wouldn't mean much.
>
> To really boil it down, you end up with a relationship table that
> looks something like this:
>
> Relation_Table
>> RecordNumber|ParentRecordNumber|misc. other columns|
>
> You don't need the records to point to their children, because the
> parent-child relationship is already inherently established. You
> could arrange it so that each record points to its children instead
> of the parent, but either way, you only need to establish the
> relation in one direction.
>
> Hope that helps...if not, give a yell.
Thanks for the info Todd, although I was looking for a object-orientated
code example for the problem. No matter, I've decided on a different
route.
Best,
-- Andrew Urquhart - Contact: www.andrewu.co.uk/contact/
- Next message: Ejay Hire: "PHP, IIS 6, and Windows 2003"
- Previous message: Joern Schauermann: "Re: How do I eregi() this?"
- In reply to: T. Relyea: "Re: Looking for example of a linked list navigation tree"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|