thegraingers Posted January 3, 2006 Share Posted January 3, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/3139-auto-increment-value-error/ Share on other sites More sharing options...
fenway Posted January 3, 2006 Share Posted January 3, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/3139-auto-increment-value-error/#findComment-10558 Share on other sites More sharing options...
fenway Posted January 3, 2006 Share Posted January 3, 2006 (accidental double-post) Quote Link to comment https://forums.phpfreaks.com/topic/3139-auto-increment-value-error/#findComment-10559 Share on other sites More sharing options...
thegraingers Posted January 3, 2006 Author Share Posted January 3, 2006 [!--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 Quote Link to comment https://forums.phpfreaks.com/topic/3139-auto-increment-value-error/#findComment-10561 Share on other sites More sharing options...
fenway Posted January 3, 2006 Share Posted January 3, 2006 Did/do you have zero-valued UIDs in these tables? Quote Link to comment https://forums.phpfreaks.com/topic/3139-auto-increment-value-error/#findComment-10563 Share on other sites More sharing options...
thegraingers Posted January 3, 2006 Author Share Posted January 3, 2006 [!--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 Quote Link to comment https://forums.phpfreaks.com/topic/3139-auto-increment-value-error/#findComment-10564 Share on other sites More sharing options...
LazyJones Posted January 3, 2006 Share Posted January 3, 2006 [!--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? Quote Link to comment https://forums.phpfreaks.com/topic/3139-auto-increment-value-error/#findComment-10565 Share on other sites More sharing options...
thegraingers Posted January 3, 2006 Author Share Posted January 3, 2006 [!--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 Quote Link to comment https://forums.phpfreaks.com/topic/3139-auto-increment-value-error/#findComment-10567 Share on other sites More sharing options...
thegraingers Posted January 3, 2006 Author Share Posted January 3, 2006 [!--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 Quote Link to comment https://forums.phpfreaks.com/topic/3139-auto-increment-value-error/#findComment-10569 Share on other sites More sharing options...
fenway Posted January 3, 2006 Share Posted January 3, 2006 Then post the statements in question... none of this story makes any sense. Quote Link to comment https://forums.phpfreaks.com/topic/3139-auto-increment-value-error/#findComment-10572 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.