Remove db dublicates

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
Arsench2000
Forum Commoner
Posts: 38
Joined: Sat Sep 15, 2007 8:18 pm

Remove db dublicates

Post by Arsench2000 »

Hello world, is there any example to remove from DB dublicated records?

Thank you
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

Re: Remove db dublicates

Post by yacahuma »

what colum type is the duplicate?(integer,string,char...)??
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Remove db dublicates

Post by VladSun »

Arsench2000 wrote:Hello world, is there any example to remove from DB dublicated records?

Thank you
You mean "all of the duplicated items" or "all of the duplicated items except one"?
There are 10 types of people in this world, those who understand binary and those who don't
efortis
Forum Newbie
Posts: 7
Joined: Mon Oct 13, 2008 7:48 pm

Re: Remove db dublicates

Post by efortis »

Do you want to delete them from the DB? or
just select distinct tuples from the table?

Code: Select all

 
SELECT DISTINCT (field) 
FROM table 
GROUP BY field
 
Post Reply