Hi,
I have this 3 tables:
Products are made by certain amount of ingredients. I can add new products and all but am having problem wit updating product. During editing product, I want to list ingreidents that are not already added to the product along with ingredients (and their amounts) that are already specified for the product. I tried this code but it only returns already specified products while sometimes adds only one new ingredient to the list to be added:
where viewexistingand newingredientsw ithproducts is defined as
I have this 3 tables:
Code:
tblProducts: productid,producntname tblIngredient:ingredientid,ingredientname tblProductsIngredients:autoid,productcode,ingredientcode,amountneeded
Code:
$strsql="SELECT * FROM viewexistingandnewingredientswithproducts WHERE productcode=$id OR productcode IS NULL"; }
Code:
select * from tblingredients,tblProductsIngredients where ingredientid=ingredientcode
Comment