My problem is that I have multiple unique keys on a table.
- Insert ignore is not an option because it suppresses the errors.
- MySQL has no support for any type of conditionals outside a statement (ex. if (cond) then insert else don't insert)
- Stored procedures are not an option (the only place I can use the if/else statements)
- On duplicate key might update a key with a new value, but I want the unique keys not to change in case one fails the unique constraint.
So the only option would be on duplicate just don't update anything. Is there any way I can achieve this? Or are there any other options?