Welcome Guest, Not a member yet? Register   Sign In
use of Unique in mySQL field cases Error
#1

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
Reply


Messages In This Thread
use of Unique in mySQL field cases Error - by richb201 - 07-20-2020, 05:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB