Jump to content

Recommended Posts

Hi all,

 

I have mistakenly inserted duplicated rows and will take forever removing them manually so hoping someone can help me with the SQL to remove duplicated results.  You can see the image where the duplicated row begins and so on.

 

The rows userID, clanID and cupID shouldn't have a duplicate. I have fixed this in my script just need to get rid of the duplicates and obviously only having 1 one of the rows.

 

duplicates.png

 

Thanks to anyone

Link to comment
https://forums.phpfreaks.com/topic/259451-delete-duplicated-rows/
Share on other sites

You'r deleting it from phpmyadmin? I think this will do it if you put it in your sql of phpmyadmin fot that table

 

DELETE FROM table_name WHERE id != 16430; if 16430 is the record you want to keep

 

OR

 

DELETE FROM table_name WHERE id != 16430 And cupID = 45; for a little insurance and if you want to get rid of only the 45's

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.