MYSQL Duplicate entry error
Hi guys,
Does anybody know how I can allow duplicated for a field in my mysql database?
I keep getting this error!
INSERT INTO `welovera_assets`.`ratingItems` (
`id` ,
`Cat` ,
`uniqueName` ,
`totalVotes` ,
`totalPoints`
)
VALUES (
NULL , 'Radio', '2', '0', '0'
)
MySQL said:
#1062 - Duplicate entry '2' for key 'uniqueName'
Thanks
Re: MYSQL Duplicate entry error
change the table definition... it sounds like the uniqueName field has been tagged with a Unique Constraint ... given that it's called "uniqueName" ... that would make sense... so either you need to change it, keep in mind that if it is also the PKey, that could lead to trouble... even if it isn't the PKey, it's unique for a reason and changing it could have unintended consequences.
-tg