Jump to content

Deleting Duplicate Entries


paradrenaline

Recommended Posts

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.