This sounds like a problem in the database itself.
In the database, what is the data type used for the ID column?
You should be using the int data type, it sounds like you may be using the tinyint data type instead.
tinyint has a maximum of min - max value of -128 through 127:
http://dev.mysql.com/doc/refman/5.1/en/integer-types.html
whereas the integer data type has a max value of 4294967295