Delete duplicate rows from mysql in php function
This project was awarded to discocactus for $10 USD.Get free quotes for a project like this
Project Budget$25 - $30 USD
Hi Coders I have a table in mysql with the following structure
I need to remove all the duplicates but leave one record using a php function.
for example the data is like this:
1 | ABC | 1
2 | XYZ | 1
3 | ABC | 2
So I want to delete the duplicate entry for [ABC] and the end result should looklike this:
1| ABC | 1
2| XYZ | 1
Ideally I would like a php function which I can call from website evry now and then , but if it is easier to implement using sql that is fine too.
Thanks in adavance
Looking to make some money?
- Set your budget and the timeframe
- Outline your proposal
- Get paid for your work
Hire Freelancers who also bid on this project
Looking for work?
Work on projects like this and make money from home!Sign Up Now
- The New York Times
- Wall Street Journal
- Times Online