homepage Welcome to WebmasterWorld Guest from 54.234.7.161
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

    
MYSQL primary key skips rows
imfree



 
Msg#: 4186421 posted 10:45 am on Aug 13, 2010 (gmt 0)

Hi all,

I'm using MYSQL 5.0.91
I have a MyISAM table with a primary key defined as int(11)
This is a simple user registration application.

Looking at the table, I'm seeing holes in the primary key, sometimes skipping one number, sometimes two, e.g. 263, 264, 266, 268. Nothing has been deleted - I'm the only one with access.
I'm woried that users' registration details are being lost somehow.

Has anyone else experienced this?

Any help very much appreciated.

 

coopster

WebmasterWorld Administrator coopster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4186421 posted 12:09 pm on Aug 15, 2010 (gmt 0)

Welcome to WebmasterWorld, imfree.

How do you know it is skipping numbers? Are you viewing the report sorted by that key?

imfree



 
Msg#: 4186421 posted 11:54 pm on Aug 16, 2010 (gmt 0)

Coopster,

thanks very much for taking the time to reply.

Two things:

1. I'm an idiot. The code doing the delete was staring me in the face, and was doing exactly what it should have, which is to delete duplicate entries.

2. Sorry to have wated your time, and the time of anyone who read this.

Thanks again for your reply.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved