SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Oct 2007
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    #1062 - Duplicate entry '23933-27243-0' for key 'membersid'

    Hi guys,

    I have a table, the table name is account,
    its have 2 fields : membersid, and categoryid



    i want to change the categoryid field content, i run this in phpmyadmin :

    update `account` set categoryid = replace (categoryid, '1' , '2');


    but get this error message

    #1062 - Duplicate entry '23933-27243-0' for key 'membersid'







    - what should i do so i can change the field content? Please help.
    I already tried changing the field TYPE, from INT, to BIGINT, like other person suggested, but still get that error message

    - this is the screenshot from the field Structure

    Make the world better

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,401
    Mentioned
    147 Post(s)
    Tagged
    4 Thread(s)
    You are not getting an error on categoryid, but on memberid.
    Run this query:
    Code:
    SELECT membersid
    FROM account
    GROUP BY membersid
    HAVING COUNT(*) > 1
    Does it return any memberid's?


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
  •