Jump to content

multiple categories


ryanfc

Recommended Posts

ok i am creating a directory of local business and need a bit of help on something.  I want to have it where a client can belong to more than 1 category or sub-category.  The categories for example are Restaurants, Entertainment, etc. Then under Restaurants you have something like Greek, Italian, etc as the sub-categories.

 

So I have 3 tables.

 

The categories table with the cat title and id number. (there are only 7 categories)

 

The sub categories table with the sub cat title, id number and the number of the category it belongs to.

 

Then I have the client table that contains the client info such as business name, address, etc. In there I have a field for the category and sub category where I fill in the correct number.  So if it is a restaurant (cat 1) and an Italian restaurant (sub cat 7) I fill in the correct fields with those numbers.  Now with some clients I want to have them say under Restaurants and sub cat Italian and Caterers.  When I try putting in 4,45 in the subcategories field of the client table it erases the ,45.  So what can I do to fix this? (so that a client can belong to more than one sub-category.    Thanks!

Link to comment
https://forums.phpfreaks.com/topic/74646-multiple-categories/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.