0
Answer

HOW: create a MySQL DB relationship for specific function

I have a database named DBproducts that contains two tables, tblProductDescription(fields = ProductCode <-- p_key,ProductName,Price,Quantity) and tblIndividualProduct(fields = BarCode <-- p_key,ExpirationDate). My target output is that when I create a new item in the tblIndividualProduct the quantity in the tblProductDescription automatically incremented if they have the same ProductCode. And the value of quantity depends on how many entries the same ProductCode is stored in tblIndividualProduct. How can I create that relationship like that between the two tables. thanks in advance