Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jun 2006
    Posts
    440
    Plugin Contributions
    0

    1062 Duplicate entry 'Administrator' for key 2

    Upgrade Issue

    --------------------------------------------------------------------------------

    Hi There,

    I wonder if anyone can point me in the right direction, I am having a problem updating my database from this.......

    Zen Cart 1.3.0.2
    Database Patch Level: 1.3.0.1

    This is the error:


    1062 Duplicate entry 'Administrator' for key 2
    in:
    [INSERT INTO query_builder ( query_category , query_name , query_description , query_string ) VALUES ('email,newsletters', 'Administrator', 'Just the email account of the current administrator', 'select \'ADMIN\' as customers_firstname, admin_name as customers_lastname, admin_email as customers_email_address from TABLE_ADMIN where admin_id = $SESSION:admin_id');]

    What to do....what to do..........Lost!!

    Many Thanks in advance

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 1062 Duplicate entry 'Administrator' for key 2

    This is caused by re-running the upgrade a second time.

    To work around it, edit the /zc_install/mysql_upgrade_1301_to_1302.sql file
    find the line that says
    INSERT INTO query_builder ( query_category , query_name , query_description , query_string ) VALUES ('email,newsletters', 'Administrator', 'Just the email account of the current administrator', 'select \'ADMIN\' as customers_firstname, admin_name as customers_lastname, admin_email as customers_email_address from TABLE_ADMIN where admin_id = $SESSION:admin_id');
    and change the first word "INSERT" to "REPLACE".

    Then re-upload the file and rerun the upgrade.

    You could also change "INSERT" to "#INSERT" (just add the # in front of it, to skip that line altogether)
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jan 2006
    Location
    Essex, UK
    Posts
    45
    Plugin Contributions
    0

    Default Re: 1062 Duplicate entry 'Administrator' for key 2

    thanks for that DR, it worked for me

  4. #4
    Join Date
    Oct 2004
    Posts
    5
    Plugin Contributions
    0

    Default Re: 1062 Duplicate entry 'Administrator' for key 2

    thanks! I had the exact same problem...minutes later fixed. God I love you guys! Thanks again!

  5. #5
    Join Date
    Aug 2006
    Posts
    50
    Plugin Contributions
    0

    Default Re: 1062 Duplicate entry 'Administrator' for key 2

    me three!!

    thanks -

  6. #6
    Join Date
    Sep 2004
    Posts
    51
    Plugin Contributions
    0

    Default Re: 1062 Duplicate entry 'Administrator' for key 2

    Quote Originally Posted by DrByte
    .....
    and change the first word "INSERT" to "REPLACE".

    Then re-upload the file and rerun the upgrade.

    You could also change "INSERT" to "#INSERT" (just add the # in front of it, to skip that line altogether)
    Changing to "REPLACE" didn't work.... but changing to "#INSERT" did!

  7. #7
    Join Date
    Apr 2006
    Location
    Fort Bragg, North Carolina
    Posts
    153
    Plugin Contributions
    0

    Re: 1062 Duplicate entry 'Administrator' for key 2

    I'm getting this same error every once in a while but I'm running zen-cart-v1.3.5. How could I fix this?

    thanks

  8. #8
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 1062 Duplicate entry 'Administrator' for key 2

    Quote Originally Posted by bigjoed
    I'm getting this same error every once in a while but I'm running zen-cart-v1.3.5. How could I fix this?

    thanks
    what is the "exact" error you're getting?
    The error discussed above is specific to performing a site-upgrade, which you shouldn't be "getting every once in a while" ...
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    Apr 2006
    Location
    Fort Bragg, North Carolina
    Posts
    153
    Plugin Contributions
    0

    Re: 1062 Duplicate entry 'Administrator' for key 2

    Error is too long to post here, this is part of the error.

    1062 Duplicate entry 'zc_7eb4ed1f36d90140477d9474b61e0e26' for key 1
    in:
    [insert into zen_db_cache set cache_entry_name = 'zc_7eb4ed1f36d90140477d9474b61e0e26', cache_data = 'a:572:{i:0;a:2:{s:6:\"cfgkey\";s:10:\"STORE_NAME\";s:8:\"cfgvalue\";s:6:\...... ....<edited>......:\"


    I noticed that it normally happens after I reboot my computer.

  10. #10
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 1062 Duplicate entry 'Administrator' for key 2

    It appears you are having an intermittent caching problem.

    Change your configure.php files to say this:
    Code:
    define('SQL_CACHE_METHOD', 'none');
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. 1062 Duplicate entry '11' for key 1
    By Sarah_77 in forum General Questions
    Replies: 5
    Last Post: 26 Dec 2011, 03:06 AM
  2. 1062 Duplicate entry '1-1' for key 1 ????
    By eggrush in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 20 Oct 2010, 06:03 PM
  3. 1062 Duplicate entry '0' for key 1
    By knitengale in forum General Questions
    Replies: 8
    Last Post: 12 Jul 2006, 12:50 AM
  4. 1062 Duplicate entry '0' for key 1
    By marckasten in forum General Questions
    Replies: 3
    Last Post: 12 Jun 2006, 06:19 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR