phpMyAdmin question

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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.

Re: phpMyAdmin question

I have same problem! :(

Re: phpMyAdmin question wrote:
Quoted text here. Click to load it

This what you mean?

Export options:
- structure
- data
    - Complete inserts

Rik Wasmus

Re: phpMyAdmin question

The question now is two things (probably the same answer).

1. The table I had to take the autonumber off, it won't let me put it
back on "Duplicate entry '1' for key 1" How do I tell it, "keep the
autoIDs that are set, and when someone adds a new one then autonumber"
because right now it is trying to renumber where there is already data.

2. Same thing with the copy of the table, it won't let me add the key
there either.

Re: phpMyAdmin question wrote:
Quoted text here. Click to load it

Maybe ask in a mysql newsgroup, such as comp.databases.mysql?

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Site Timeline