How can I delete a duplicate row?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dilruk83
Forum Newbie
Posts: 13
Joined: Thu Oct 30, 2008 6:44 am

How can I delete a duplicate row?

Post by dilruk83 »

Here is my table.this table is creating automatically using for loop.Dont think about table just think about table data only.

id name age
1 a 24
1 b 25
2 c 20
2 d 21
3 e 19
3 f 19
1 a 24
1 b 25
2 c 20
2 d 21
3 e 19
3 f 19

I just want to delete or ignore duplicate rows when this table creating automatically.


Thank you..
User avatar
Weiry
Forum Contributor
Posts: 323
Joined: Wed Sep 09, 2009 5:55 am
Location: Australia

Re: How can I delete a duplicate row?

Post by Weiry »

This was the very result of a "mysql delete duplicate rows" Google search.....................

Deleting Duplicate Rows in a MySQL Database

Remember, Google is your friend too.
dilruk83
Forum Newbie
Posts: 13
Joined: Thu Oct 30, 2008 6:44 am

Re: How can I delete a duplicate row?

Post by dilruk83 »

Thank you


but i want to delete rows when table is creating.Coz those database values I'm getting from different tables.
User avatar
Weiry
Forum Contributor
Posts: 323
Joined: Wed Sep 09, 2009 5:55 am
Location: Australia

Re: How can I delete a duplicate row?

Post by Weiry »

Post Reply