RE: [PHP] Category and sub-category logic

2003-08-17 Thread Ralph Guzman
Read this article: http://www.evolt.org/article/Four_ways_to_work_with_hierarchical_data/17 /4047/index.html It explains the 4 different methods that you can use when working with hierarchical data. -Original Message- From: Ryan A [mailto:[EMAIL PROTECTED] Sent: Thursday, August 14, 200

[PHP] Chris->Re: [PHP] Category and sub-category logic

2003-08-17 Thread Ryan A
AIL PROTECTED]> To: "David Otton" <[EMAIL PROTECTED]>; "Ryan A" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, August 15, 2003 2:04 AM Subject: RE: [PHP] Category and sub-category logic > David Otton <mailto:[EMAIL PROTECTED]> >

Re: [PHP] Category and sub-category logic

2003-08-15 Thread CPT John W. Holmes
From: "Richard Baskett" <[EMAIL PROTECTED]> > Wouldn¹t it just be easier to do a relationship table as in > > Personnel > emp ID parent > > 'Albert' 1 0 > 'Bert'2 1 > 'Chuck' 3 1 > 'Donna' 4 0 > 'Eddie' 5 4 > '

Re: [PHP] Category and sub-category logic

2003-08-15 Thread Mark
--- "CPT John W. Holmes" <[EMAIL PROTECTED]> wrote: > From: "Mark" <[EMAIL PROTECTED]> > > > > I'm trying to get a handle on this algorithm as well. If you add > > additional children to a parent record, doesn't that require > > renumbering all the rgt and lft values in the lineage? For > example

Re: [PHP] Category and sub-category logic

2003-08-15 Thread Richard Baskett
nly way to have a friend is to be one." - Ralph Waldo Emerson > From: Mark <[EMAIL PROTECTED]> > Date: Fri, 15 Aug 2003 07:18:41 -0700 (PDT) > To: "Chris W. Parker" <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP] Category and sub-category logic &g

Re: [PHP] Category and sub-category logic

2003-08-15 Thread CPT John W. Holmes
From: "Mark" <[EMAIL PROTECTED]> > I'm trying to get a handle on this algorithm as well. If you add > additional children to a parent record, doesn't that require > renumbering all the rgt and lft values in the lineage? For example > (table shamelessly stolen from a website): > > Personnel > emp

RE: [PHP] Category and sub-category logic

2003-08-15 Thread Mark
I'm trying to get a handle on this algorithm as well. If you add additional children to a parent record, doesn't that require renumbering all the rgt and lft values in the lineage? For example (table shamelessly stolen from a website): Personnel emp lft rgt == 'Al

RE: [PHP] Category and sub-category logic

2003-08-14 Thread Chris W. Parker
David Otton on Thursday, August 14, 2003 4:58 PM said: > The advantage of doing it this way is that your tree structure is > generic and can have many levels. The disadvantage is that you may > need many SQL queries to fully traverse the tree (though people > rarely

Re: [PHP] Category and sub-category logic

2003-08-14 Thread David Otton
On Fri, 15 Aug 2003 00:20:58 +0200, you wrote: >Hi, >I am thinking of making a program for personal use which does a very simple >thing, just displays listings under categories, >eg: >under main category "Auto" there would be "cars","bikes" etc >under "banking" there would be "financing","loans"

RE: [PHP] Category and sub-category logic

2003-08-14 Thread Chris W. Parker
Ryan A on Thursday, August 14, 2003 3:21 PM said: Read this http://www.sitepoint.com/article/1105 and you will know what you should do. The database organization you want to use is called Modified Preorder Tree Traversal. It takes only one table to create all the re