i hope you understand my problem, on my db i have ord_detail & custom_ord_detail tables
ord_detail
-------------------------------------------------
ordID | custID | productID |quantity | discount |
-------------------------------------------------
002 | 1 | 5 | 2 | 0 |
-------------------------------------------------
custom_ord_detail
--------------------------------------------------------
ordID | custID | custom_productID |quantity | discount |
--------------------------------------------------------
002 | 1 | 2 | 1 | 0 |
-------------------------------------------------
ordID -> primary key auto_increment (in second table ordID is primary key auto_increment , foreign key refere to table called custom_ord_reply)
custID -> foreign key refer to customer table ,
productID -> foreign key refer to products table , custom_productID foreign key refer to custom_ord_reply table that the customer request the product in custom_ord_request table.
After we bring the specific product we store it into custom_ord_reply, now we use ord_detail & custom_ord_detail when user added the product into cart and we use union all to show the all products in cart , if the customer want to update the quantity or delete specific product how can do this becouse they will be Duplicate values for the ordID column , how could fix this problem ? any idea
union all with join