|  | Posted by Rik on 05/22/06 13:10 
JMosey@gmail.com wrote:> I know this isn't strictly php, but I am guessing someone has run into
 > this before in php work.
 >
 > I have a table, this table has an autonumber as a primary key.
 >
 > I export the table in phpMyAdmin.
 >
 > Cool so far.
 >
 > I create a new DB, I import the backup of the DB in that new DB and it
 > throws an error that the table with the automnumber already has a
 > value of 1 (it isn't incrementing the new table).
 >
 > Ok, go back and hack through, remove the autonumber. Now export and it
 > imports fine.
 >
 > Except how do I get the autonumber back? There are hundreds of rows of
 > data and I want that autonumber but when I try and add it it says
 > there is already an ID field with a "1" (same as before, not saying
 > "find the highest and add one more" just saying "start at 1, oops
 > there is one, then die"
 >
 > Anyone know a way around this? I want ot add my autonumber to my table
 > with the data that is already there.
 
 
 This what you mean?
 
 Export options:
 - structure
 - Add AUTO_INCREMENT
 - data
 - Complete inserts
 
 Grtz,
 --
 Rik Wasmus
 [Back to original message] |