close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Help with table relationships and joining tables

Thread began 8/22/2014 5:05 pm by joerg431091 | Last modified 9/04/2014 2:22 pm by joerg431091 | 1144 views | 15 replies

joerg431091

Help with table relationships and joining tables

I like to have recipes on the website that the user can display by choosing a certain category.

Lets say the database holds 100 recipes and those are categorized in 5 categories (Meat, Fish, Salad, Soup, Chicken, etc). So the user will click on the category he likes displaying all the recipes within that category.

I can not figure out how to assign one recipe to several different categories so that Recipe 58 for example will be displayed in the meat as well as in the salad category.

So two tables in the DB are recipes and recipescategories

recipes

RecipeID (PK)
RecipeTitle
RecipeDescription
etc…

recipescategories

RecipeCategoryID
RecipeCategoryName

I am new to Databases and struggle if it comes to table relationships and joining tables (obviously). So after researching this it appears that I have to create another table to join those two tables so i did another which is:

recipe_category_join

RecipeID (PK)
RecipeCategoryID (PK)

Am I on the right path to achieve this and is there a tutorial available that shows how something like this is done and also how to do this in the insert and update pages?

Any help that points me in the right direction is greatly appreciated.

Thanks a lot

Joerg

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