I want to tidy my reviews up as the numbering is all over the place. It sort of goes from 1 to15 the jumps for some reason to 299. Where is the auto-increment number for reviews stored?
Mar 23, 2010, 7:28 AM
Veteran / Moderator (18436 posts)
Mar 23, 2010, 7:28 AM
Post #2 of 5
Views: 3283
Hi,
I had to edit your subject to remove the # from it, as it wouldn't let me view the post :D
The overall Auto incriment number is stored in the table itself.
To reset it, you would use:
HOWEVER, this may not quite work for you - as you if you do that, then any existing records may end up broken. Before trying it, make sure you backup the table and its contents
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
I had to edit your subject to remove the # from it, as it wouldn't let me view the post :D
Code:
I want to tidy my reviews up as the numbering is all over the place. It sort of goes from 1 to15 the jumps for some reason to 299. Where is the auto-increment number for reviews stored?The overall Auto incriment number is stored in the table itself.
To reset it, you would use:
Code:
ALTER TABLE theTableInQuestion AUTO_INCREMENT=1234HOWEVER, this may not quite work for you - as you if you do that, then any existing records may end up broken. Before trying it, make sure you backup the table and its contents

Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Mar 23, 2010, 9:03 AM
Enthusiast (559 posts)
Mar 23, 2010, 9:03 AM
Post #3 of 5
Views: 3274
Andy wrote:
The overall Auto incriment number is stored in the table itself.So I can't just locate that number and change it manually? If the only option is what you propose above than I'll leave it as it is as I don't want to risk creating unnecessary work if it goes wrong.
Mar 23, 2010, 9:08 AM
Veteran / Moderator (18436 posts)
Mar 23, 2010, 9:08 AM
Post #4 of 5
Views: 3282
Well, you could do something like this to find the highest ReviewID:
...and then once you know that, then do:
Again though, be sure to backup your DB first :)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Code:
SELECT MAX(ReviewID) FROM glinks_Reviews...and then once you know that, then do:
Code:
ALTER TABLE glinks_Review AUTO_INCREMENT= WHATEVER THE NUMBER WASAgain though, be sure to backup your DB first :)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!