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

2003-08-17 Thread Ryan A
] 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] on Thursday, August 14, 2003 4:58 PM said: The advantage of doing it this way

RE: [PHP] Category and sub-category logic

2003-08-17 Thread Ralph Guzman
, 2003 3:21 PM To: [EMAIL PROTECTED] Subject: [PHP] Category and sub-category logic 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

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 ==

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 Richard Baskett
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 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

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 (table

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 'Fred'6

[PHP] Category and sub-category logic

2003-08-14 Thread Ryan A
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 etc (I as admin create master and sub-categories) then if you

RE: [PHP] Category and sub-category logic

2003-08-14 Thread Chris W. Parker
Ryan A mailto:[EMAIL PROTECTED] 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: [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 etc (I as admin

RE: [PHP] Category and sub-category logic

2003-08-14 Thread Chris W. Parker
David Otton mailto:[EMAIL PROTECTED] 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 want