Jump to content

Recommended Posts

I am using php/mysql widely on my web site and two of my tables keep getting the following error

 

"Auto-increment value: 0 is smaller than max used value....."

 

Which is fixed by repairing the table.

 

This is happening a few times a week and I am keen to identify the problem and fix it, any clues welcomed, thanks

Link to comment
https://forums.phpfreaks.com/topic/3139-auto-increment-value-error/
Share on other sites

When you do receive these errors? When you run CHECK TABLES? I'm not sure I really understand the error message either, though it's possible that you have auto_increment values of 0 in your tables, which are strictly allowed, but no desired. Please clarify.

[!--quoteo(post=332808:date=Jan 3 2006, 06:39 PM:name=fenway)--][div class=\'quotetop\']QUOTE(fenway @ Jan 3 2006, 06:39 PM) 332808[/snapback][/div][div class=\'quotemain\'][!--quotec--]

When you do receive these errors? When you run CHECK TABLES? I'm not sure I really understand the error message either, though it's possible that you have auto_increment values of 0 in your tables, which are strictly allowed, but no desired. Please clarify.

 

 

Yes the error is showing up when I do a check table.

I have an automated check on a number of tables in place following some other errors which were occuring a few months ago

[!--quoteo(post=332824:date=Jan 3 2006, 07:16 PM:name=fenway)--][div class=\'quotetop\']QUOTE(fenway @ Jan 3 2006, 07:16 PM) 332824[/snapback][/div][div class=\'quotemain\'][!--quotec--]

Did/do you have zero-valued UIDs in these tables?

 

no, in both tables the lowest auto increment value present is 1

[!--quoteo(post=332832:date=Jan 3 2006, 02:40 PM:name=thegraingers)--][div class=\'quotetop\']QUOTE(thegraingers @ Jan 3 2006, 02:40 PM) 332832[/snapback][/div][div class=\'quotemain\'][!--quotec--]

no, in both tables the lowest auto increment value present is 1

 

So are you trying to insert 0 into that field then?

[!--quoteo(post=332837:date=Jan 3 2006, 07:46 PM:name=LazyJones)--][div class=\'quotetop\']QUOTE(LazyJones @ Jan 3 2006, 07:46 PM) 332837[/snapback][/div][div class=\'quotemain\'][!--quotec--]

So are you trying to insert 0 into that field then?

 

no

[!--quoteo(post=332840:date=Jan 3 2006, 07:49 PM:name=thegraingers)--][div class=\'quotetop\']QUOTE(thegraingers @ Jan 3 2006, 07:49 PM) 332840[/snapback][/div][div class=\'quotemain\'][!--quotec--]

no

 

The error follows a select statement, sometimes on the same table the error is found in, which finds no matching rows

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.