[ad_1]
just set the unique value with the original value, (Assuming ProductID is unique) eg,
INSERT INTO CART (ProductID, Quantity)
VALUES (1, 100)
ON DUPLICATE KEY UPDATE ProductID = ProductID;
[ad_2]
solved Update nothing on duplicate key exist [closed]