Re: Looking for example of a linked list navigation tree

From: Andrew Urquhart (reply_at_website.in.sig)
Date: 04/23/04


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/


Relevant Pages

  • Re: How to set up an automatic archive of city council committees public notices
    ... The public notices are formatted in microsoft word .doc ... > web site at http://cityofboston.gov ... Store all your notices in binary form in a database, ... Find someone to throw you a bit of PHP code together that presents a web ...
    (comp.os.linux.misc)
  • Re: how to search keywords in all directories
    ... Thanks for your response. ... so I don't warry at weekend to read a lots of programs at home. ... lots of .php code and Database tables. ...
    (freebsd-questions)
  • Re: Write custom code or use a mysql php code generator?
    ... I am developing a web application that uses a mysql database on the backend. ... I am now exploring different options for writing the php code that will ... I tried a few code generators when i first started out, ...
    (alt.php)
  • Re: PHP Dynamic Database Code
    ... database schema, and an EXPORT function which creates two files per table - ... I recently wrote some PHP classes that I think might be of interest to ... generate PHP code based on database table structure. ... A perl script named 'gendb' that reads the config file, ...
    (comp.lang.php)