I'm trying to figure out how can I do this:

I'm designing a mysql db for a delivery service, and I encounter a problem
each item delivered has a code associated
and it also does some querys in other associated tables, I mean:

Prod ID = 11       Prod = Pizza    RecipeID=01   REcipe has the ingredients
and each time a prod is ordered all the ingredients are added to a day
total.

I mean the employee enters the code for Pizza, then it adds the pizza
individual ingredients to the day total, there are also combined orders, my
problem is which is the best way to create an associated table with each of
the item ingredients (they have to be editable), because they have unique
recipes that are modifiable.

I mean

Products                                                      Recipes
--------------------------------                    ------------------------
-------------
ProdId        Name  ... (other fields)             RecID        Desc
01                Pizza                                      11
Pizza

and here is my problem

RecipesDesc

RecId      Item       qty        estcost  ....
 11          Flour      ....
 11          Tomato  ....

each item must be edited so RecId will be repeated for many times, so by the
end of the day if I want to know how much flour was spent I will have the
same ingredient repeated all over in different recipes, which is the best
way to overcome this ?

I couldn't figure it out,


Thank you,

Ricardo Fitzgerald
Web Developer

__________________________________________________________________ Omni
ICQ#: 37031810 Current ICQ status: + More ways to contact me
__________________________________________________________________


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to