Raised This Month: $ Target: $400
 0% 

Mysql update AUTO_INCREMENT id.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 11-05-2013 , 15:29   Re: Mysql update AUTO_INCREMENT id.
Reply With Quote #13

The problem is that you have not clearly explained yourself. So, I am going to guess at what you are talking about

You had an existing table and then you added a new column and set it to Auto_Increment. When you do this, you need to MANUALLY set the Auto_Increment value on all existing data and then MANUALLY change the Next Auto_Increment value to the actual next value.

If you have an existing table with data, you need to determine the ID of the row you want to update before you actually update it, otherwise your query will insert a new row or fail for having more than 1 match.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
 



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

Forum Jump


All times are GMT -4. The time now is 23:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode