close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

One product, mutiple categories...problem!

Thread began 5/20/2011 7:51 pm by martin400112 | Last modified 5/26/2011 3:40 pm by martin400112 | 814 views | 2 replies

CraigRBeta Tester

its difficult to give a definitive answer without knowing your current database structure, but here is my approach.
Hope it is clear

When you have one category per item, you can store the categoryid as a field in the items table, and everything is straightforward.
With this structure, you can only have one category per item, (unless you duplicate the item).

To have multiple categories per item, you need a separate table with a one-to-many relationship with the items table, with itemid as the foreign key.
(You could add a primary key to this table, or create a compound key of the ItemID and CategoryID fields)

so your table could look like..

ItemID : CategoryID
1 : 1
1 : 2
2 : 1

Linked to the items table, this would mean item 1 belongs to both categories one and two. Item 2 belongs only to category one

When inserting a record, your form would need to show all categories available, using either a multi select list or check boxes, and have a multiple record insert behavior acting on this category table.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...