use of Unique in mySQL field cases Error |
I want to limit the values in one varchar field in mySQL to be unique. I am finding that when my code tries to add another copy of the same varchar I get
ERROR - 2020-07-21 00:13:54 --> Query error: Duplicate entry 'software engineer' for key 'item' - Invalid query: INSERT INTO `exclude` (`item`, `campaign`, `userid`) VALUES ('software engineer', 'Apple', '[email protected]') I do want to not allow a duplicate, but I don't want an error to occur when an attempt is made. How can I inhibit the ERROR message?
proof that an old dog can learn new tricks
|
Welcome Guest, Not a member yet? Register Sign In |