/    Sign up×
Community /Pin to ProfileBookmark

I get an error message about a duplicate key 127. I’ve seen this before and in phpMyAdmin I just used the repair button and that fixed it. This time it doesn’t work. The next auto increment is 127.

How can I fix this? I deleted the row with the id of 127 but I don’t think that worked.

Thanks

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@bathurst_guyJan 30.2006 — I bet the field is a smallint type or the like, and you are attempting to enter in a number that is greater than 127. Try changing the field type to an INT or longer value.
Copy linkTweet thisAlerts:
@madddidleyauthorJan 30.2006 — Yeah, I was using tinyint. I just came to say I figured it out. Thanks for the help though.

http://dev.mysql.com/doc/refman/5.1/en/numeric-types.html
×

Success!

Help @madddidley spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...