In Progress

Delete duplicate rows from mysql in php function

Hi Coders I have a table in mysql with the following structure

Tablename: tblItems

Fields

[ID]-->PK INT

ItemName -->Varchar(50)

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

Skills: MySQL, PHP, Script Install, Shell Script, Software Architecture, Software Testing, Web Hosting, Website Management, Website Testing, Windows Desktop

See more: duplicate data entry, abc data entry, sql duplicates, rows, delete, delete duplicate, sql table remove, duplicate table, remove duplicates mysql, mysql structure, php mysql sql example, mysql delete using, call function, mysql remove duplicate rows, mysql sql function, mysql delete duplicate, mysql record, delete function, mysql remove table, mysql remove duplicate, abc website, delete sql php, script duplicate entry php, abc php mysql, remove duplicate

About the Employer:
( 137 reviews ) Brisbane, Australia

Project ID: #2738403

Awarded to:

discocactus

See private message.

$10 USD in 14 days
(38 Reviews)
4.6

10 freelancers are bidding on average $20 for this job

vektormedia2

See private message.

$40.8 USD in 14 days
(310 Reviews)
6.8
customizedata

See private message.

$25.5 USD in 14 days
(106 Reviews)
5.7
virals2583

See private message.

$25.5 USD in 14 days
(16 Reviews)
5.5
bachchuju

See private message.

$20.4 USD in 14 days
(19 Reviews)
4.3
lolingualtd

See private message.

$25.5 USD in 14 days
(6 Reviews)
2.5
parama4uvw

See private message.

$20.4 USD in 14 days
(4 Reviews)
0.0
martdesignstudio

See private message.

$5 USD in 14 days
(1 Review)
0.0
AbdulHadi10

See private message.

$10 USD in 14 days
(2 Reviews)
0.0
ebione

See private message.

$15 USD in 14 days
(0 Reviews)
0.0