MySQL Forums
Forum List  »  Newbie

Cookbook Query
Posted by: Bamatick
Date: September 12, 2004 04:08PM

I have a DB with 3 tables:
dishes (dishID, dishName, calories, etc)
ingredients (ingredID, ingredName, cost, etc)
recipes (recipeID, dishIDFK, ingredIDFK)

What I want is:
1. Spaghetti
a)Noodles
b)Sauce
2. Tuna Surprise
a)Noodles
b)Peas
c)Tuna
N. Dish N
a)Ingredient N

What's the SQL that gives me that?

What I am currently getting with the code I have is:
1. Spaghetti
a)Noodles
2. Spaghetti
b)Sauce
3. Tuna Surprise
a)Noodles
4. Tuna Surprise
b)Peas
5. Tuna Surprise
c)Tuna

Options: ReplyQuote


Subject
Written By
Posted
Cookbook Query
September 12, 2004 04:08PM
September 12, 2004 10:29PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.