Results 1 to 3 of 3

 

Thread: Probably basic PHPMyAdmin question

  1. #1
    Registered User

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Great Yarmouth, UK
    Posts
    559
    Thanks
    0
    Thanked 0 Times in 0 Posts


    I need to find some duplicates in a database. I use PHPMyAdmin to manage the database. How do i do this.

    The database has approx 30,000 entries, so sorting by field and scrolling through is not an option!

    It's a single field that's duplicate, not the entire record. And there's 6 of them to be found.

    Help would be much appreciated.

  2. #2
    Avoiding real work

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Buckinghamshire
    Posts
    1,373
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Easiest way would be to do a query similar to the following -

    SELECT fieldname, count(*)
    FROM tablename
    GROUP BY fieldname
    HAVING count(*) > 1

    where fieldname is the name of the field that has the duplicates in.

    That should give you the records that are duplicated.
    Those who can do, those who can't talk about it

  3. #3
    Registered User

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Great Yarmouth, UK
    Posts
    559
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Excellent, haven't tried it yet, but i will a little later.

    Thanks



Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
To Top

Content Relevant URLs by vBSEO 3.5.0 RC2