freakus_maximus Posted April 20, 2006 Share Posted April 20, 2006 Here's an odd one...hoping someone has run into this and may have a clue...If I start with an empty table (my "id" field is set to autoincrement and is the primary key) any updates I do with my form all work just fine.But, if I import (through phpMyAdmin) a data file and fill in the table and then later try and do an update through my form I get a duplicate key 1 error. My form handles checking for existing "defectnumber" and the table does not allow duplicates on that field.I went back and emptied the table again just to check and my updates work fine from the form. Any ideas what could be the problem that only after importing I get a duplicate key 1 error? Quote Link to comment Share on other sites More sharing options...
jworisek Posted April 20, 2006 Share Posted April 20, 2006 try importing the data, then removing the primary key and try to insert data into the table... could it be that when you import this data file it isn't updating the position for the unique ID that you use? so after importing its still trying to dump it in at 1 when 1 already exists?You could also try setting your id value to a number you know isno't already in the table to see if that still causes the error. Quote Link to comment 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.