Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: auto increments

  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Depends on the time of year
    Posts
    478
    Thanks
    0
    Thanked 0 Times in 0 Posts

    auto increments

    I created this table which has a unique column/key which is autoincremented every time a new variable is put in.

    I created some pages so that people can post information on the table, but unfortunately, it stops at 127 and says that information is repeated time and time again.

    "Duplicate entry '127' for key 1" - is there error that is reported.

    So I tried deleting entries and seeing that if it does go beyond 127.

    Which led me to my second question as well: If i delete a whole bunch of entries, and want it to start incrementing from the starting point of where the entries are deleted from, how do I do that? So if I had entries from 0-236 but deleted all the entries from 101 to 236, how do I make sure the auto-incrementing command starts from 101 instead?

    Thanks
    Duniyadnd

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Depends on the time of year
    Posts
    478
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Okay, figured out the first problem, I had the key stored as "tinyint" instead of another form of Int, and I hadn't realized that until I went into my control panel to check it out.

    Anyone got any idea on the second problem?

    Thanks
    Duniyadnd

  • #3
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    This doesn't belong in the PHP forum. Moving to MySQL forum....
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Depends on the time of year
    Posts
    478
    Thanks
    0
    Thanked 0 Times in 0 Posts
    forget this thread, the following link deals with the same question, sorry for the repeat.

    http://www.codingforums.com/showthre...&threadid=6613

    Duniyadnd


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •