[Solved] Update nothing on duplicate key exist [closed]


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;

solved Update nothing on duplicate key exist [closed]