Re: QuickForm hierselect - need to implement 3 levels of company policy pulldown selection - help with design?

From: Date: Sat, 30 Jul 2005 19:16:44 +0000
Subject: Re: QuickForm hierselect - need to implement 3 levels of company policy pulldown selection - help with design?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20187@lists.php.net to get a copy of this message
On 7/30/05, l Burnerheimerton <lburnerheimerton@yahoo.com> wrote: > I have a set of policies I need to implement. The > rules have 4 levels: > Policy Title > Category > Sub-Category > Policy > > Ideally, I'd like to have four pull down menus that > would walk the user through choosing the policy. > > Currently I have ONE database table with the four > fields but I wonder if it would easier to implement > hierselect if I had four separate tables each with its > own key field. > > Any ideas of how to implement this and db design are > MUCH appreciated > You can use Hierselect with your current DB structure, but I would suggest changing it. If you have a 4-deep structure and lots of info then you're going to have lots of repeats in there. Also, think of when you rename, say, a top-most category. You would have to change a whole lot of records. I would suggest 4 tables, each with a foreign key pointing to the parent record. -- Justin Patrin

« previous php.pear.general (#20187) next »