|
-
Oct 23rd, 2012, 03:54 PM
#1
Thread Starter
Fanatic Member
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
-
Oct 23rd, 2012, 04:18 PM
#2
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|