Re: Programming User-Customized Categories ??

From: Date: Fri, 18 Jun 2004 20:51:13 +0000
Subject: Re: Programming User-Customized Categories ??
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-188615@lists.php.net to get a copy of this message
Monty wrote --- napísal::
Hi, I need to add the ability for users to define and set up their own categories and sub-categories that can be used to group contacts they enter into a database. Here's an example of how the data might be stored...
    Name            Main Category       Sub Category
    -------------   -----------------   ----------------
    John Doe        Sales               New York Office
    Jane Smith      Sales               Orlando Office
    Mark Jones      Creative
    Sarah Williams  Creative
    Kevin Brown     Manager             Office Manager
    Joe Johnson     Manager             Site Manager
   
I need to allow users to define the types of Main Categories they want, and to also define whether or not those Main Categories will have Sub Categories, which they can also define. I know how to do this if the types of categories and sub-categories were pre-defined, but, I'm finding it a lot trickier to allow the users to customize these with their own category types. So, I'm hoping someone might be able to point me to an example of how custom categories and sub-categories can be programmed in PHP and set up in MySQL. Any suggestions or advice would be much appreciated! Monty
Add another column to the table, that will specify what user "owns" the category

« previous php.general (#188615) next »