Page 1 of 1

[SOLVED] id has a 127 key limit?

Posted: Tue Jul 06, 2004 7:32 am
by Linkjames
My MySql database is refusing to let my key go above 127. If I set it to index it will accept all my entrys (About 800) but gives them individual id keys for the first 127, then numbers the rest as 127 also.

If I then try and set it to unique (With all 800 entrys in the database I get the error

Code: Select all

#1062 - Duplicate entry '127' for key 1
any ideas?
Thanks guys and gals
LinkJames

Posted: Tue Jul 06, 2004 7:37 am
by redmonkey
You need to change your column type to something other than a 'tinyint'

Posted: Tue Jul 06, 2004 7:43 am
by Linkjames
What I love about this forums is that I will struggle with a problems for half a day, admit defeat and post it here, then solve it myself within 30 mins. :D

The problem was I was using a signed tinyint which only holds 127 plus and minus. Prat :)

Cheers anyway guys
LinkJames

*Edit* Didn't see your reply untill I posted this redmonkey, damn your fast :) but you are exactly right. Thank you very much for helping, much appreciated

Posted: Tue Jul 06, 2004 7:52 am
by redmonkey
Linkjames wrote:The problem was I was using a signed tinyint which only holds 127 plus and minus. Prat :)
Actually its from -128 to +127 :wink: but yes that was the problem.