Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member RoyDude's Avatar
    Join Date
    Sep 2004
    Posts
    4
    Member #
    7580
    My one-table MySQL database has suddenly stopped auto-incrementing the auto-increment value that I use for my primary key. The auto-increment key is a tinyint that started at 1. It got up to 127, but now whenever I try to add a new entry, it always tries to use 127 as the value, and thus I get a "Duplicate entry '127' for key 1" error. I tried deleting the original 127 entry as well as 126, but when a new entry is then made, it takes up the 127 spot again, and any further new entry attempts get the same duplicate entry error. I also tried backing up, dropping, and restoring the database, to no avail.

    Any idea of what could be wrong?

    Thanks,
    ~Roy

  2.  

  3. #2
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Use INT(10); TINYINT stops at 127.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  4. #3
    Junior Member RoyDude's Avatar
    Join Date
    Sep 2004
    Posts
    4
    Member #
    7580
    Quote Originally Posted by filburt1
    Use INT(10); TINYINT stops at 127.
    Ah, I had a feeling it was going to be something simple like that....lol

    Many thanks filbut!

    ~Roy


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 03:53 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com