paradrenaline Posted March 2, 2007 Share Posted March 2, 2007 I don't have question about a particular code error. I want to know if there is a way to delete a duplicate entry in a database without losing the ID. I have a database of registered participants for an event. Example: Participant 1 registered and is given ID number 7014. The participant then enters again by mistake and is given another ID of 7015. If I delete this entry then the next person who registers gets 7016. Is there a way to delete the information from entry 7015 but maintain this value so that the next person who enters receives this number??? Hope that makes sense. Thanks for any help you can offer. Dan Link to comment https://forums.phpfreaks.com/topic/40795-deleting-duplicate-entries/ Share on other sites More sharing options...
btherl Posted March 2, 2007 Share Posted March 2, 2007 Details are here: http://dev.mysql.com/doc/refman/5.1/en/example-auto-increment.html Look at the bottom of the main section, above the user comments. Link to comment https://forums.phpfreaks.com/topic/40795-deleting-duplicate-entries/#findComment-197553 Share on other sites More sharing options...
fenway Posted March 2, 2007 Share Posted March 2, 2007 Why does this question come up all the time? Why do you care which number they get? If there were other records linked to person 7015, when you "fix" it so that a new person also gets 7015, you'll have all sorts of corruption. Don't do this ... EVER. Let the table assign whatever number it wants to your records. Link to comment https://forums.phpfreaks.com/topic/40795-deleting-duplicate-entries/#findComment-198062 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.