ID issue.

Discussion in 'MySQL' started by Miquexia, Mar 1, 2010.

  1. #1
    Hello,

    Some time I ago my highest ID of a table was 803. I wanted to test something and made another row with the ID 8004 instead of 804. I deleted the row when I was done. But the issue is that everytime a user signs up on my page it gets the ID 8005, 8006, 8007, etc. Instead of 805, 806, etc. So it skips LOTS of ID's.

    Is there a way to fix this?

    Thanks
     
    Miquexia, Mar 1, 2010 IP
  2. redlightshooter

    redlightshooter Greenhorn

    Messages:
    94
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    18
    #2
    try to alter table to reset auto increment
    ALTER TABLE table AUTO_INCREMENT=805
    Code (markup):
    but you should delete the id that greater than 804 to avoid conflict
     
    redlightshooter, Mar 1, 2010 IP
  3. Miquexia

    Miquexia Peon

    Messages:
    103
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Worked like a charm. Thanks alot! ;)
     
    Miquexia, Mar 1, 2010 IP
  4. redlightshooter

    redlightshooter Greenhorn

    Messages:
    94
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    18
    #4
    you're welcome... :D
     
    redlightshooter, Mar 2, 2010 IP