Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 31 Oct 2016, 23:35
boxingscene boxingscene is offline
 
Join Date: Sep 2004
Userid Auto Increment Issue

I've noticed as of late that our User IDs in mysql are not in order. (VB 3.8.2)

I guess somewhere along the line a few numbers got skipped and the system started filling those skipped numbers and now they are all over the place.

Someone might register right now and get a User ID (not yet taken) that is two pages back.

The issue is causing some errors. Some users complain they don't receive registration emails and I, at times, don't receive notifications of their registrations.

Not exactly sure how to correct this. The numbers are all there (when I click to view by numerical order) but the USER IDs are not in numerical order when clicking on the table in normal fashion.
Reply With Quote
  #2  
Old 01 Nov 2016, 00:21
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
If you dont view them with a sort order set, then they are not going to necessarily be listed in order, MySQL does not care about storing rows in any order internally.
__________________
Former vBulletin.org Staff Member


Cable Forum
Please do not PM me about custom work - I no longer undertake any.
Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum.
Reply With Quote
  #3  
Old 01 Nov 2016, 00:29
boxingscene boxingscene is offline
 
Join Date: Sep 2004
Originally Posted by Paul M View Post
If you dont view them with a sort order set, then they are not going to necessarily be listed in order, MySQL does not care about storing rows in any order internally.
That makes sense. My developer just told me because my database is so big (almost 30 gigs) that phpmyadmin is not necessarily going to sort that much date in numerical order.

When I ran a test query below, everything came up fine and in order with no IDs skipped.

SELECT * FROM `user` WHERE `userid` BETWEEN 12986000 AND 12986500 ORDER BY `userid` ASC limit 0,100
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 10:45.

Layout Options | Width: Wide Color: