Page 4 of 4 FirstFirst ... 234
Results 31 to 38 of 38
  1. #31
    Join Date
    Jun 2007
    Location
    SA
    Posts
    91
    Plugin Contributions
    0

    Default Re: 1062 Duplicate entry '0' for key 1 after export/import of database

    Sorry about that here is some more info:
    You should include:
    a- The version of Zen Cart you are using and whether this is a new install or an upgrade.
    I think im on version 1.3.7, new install

    b- A list of all the addons/contributions you have installed, and any kinds of customizations you've made to your site.
    Cart Editor nothing else

    c- The type of server you are using and, if you are installing locally, the operating system
    This i dont know, i do know my site is hosted in Florida on Linux server

    d- The version of PHP installed on the server
    phpMyAdmin - 2.8.2.4

    e- The version of MYSQL installed on the server
    MySQL - 4.1.20

    f- Details of exactly what you were doing when your problem occurred.
    I logged into the site and found the error
    Last edited by LloydR; 29 Jun 2008 at 08:45 AM. Reason: spelling

  2. #32
    Join Date
    Jun 2007
    Location
    SA
    Posts
    91
    Plugin Contributions
    0

    Default Re: 1062 Duplicate entry '0' for key 1 after export/import of database

    Here is a link to a screenshot of the admin_activity_log

    http://img262.imageshack.us/img262/1...vityloggj1.jpg

    Does any thing look odd?
    Last edited by LloydR; 29 Jun 2008 at 09:04 AM. Reason: update

  3. #33
    Join Date
    Jun 2007
    Location
    SA
    Posts
    91
    Plugin Contributions
    0

    Default Re: 1062 Duplicate entry '0' for key 1 after export/import of database

    [FONT=Arial]Hi All again[/FONT]
    [FONT=Arial]I have PMed DrByte for some help but will post my PM here as well, maybe some one can see something i dont as im new to MySQL and have no idea what im looking for:[/FONT]
    [FONT=Arial] [/FONT]
    [FONT=Arial]Please see below for things I have found that look a bit odd while checking each tables “Auto_Increment” is on and that the Next Autoindex number is correct when checking against the primary field under the browse option for that table :[/FONT]
    [FONT=Arial]· [/FONT][FONT=Arial]email_archive table - not found in mysql[/FONT]
    [FONT=Arial]· [/FONT][FONT=Arial]featured table shows value 11 for Next Autoindex but the browse option is greyed out[/FONT]
    [FONT=Arial]· [/FONT][FONT=Arial]products_attributes table shows value 1,104 for Next Autoindex but browse button greyed out[/FONT]
    [FONT=Arial]· [/FONT][FONT=Arial]specials table shows value 51 for the Next Autoindex but browse button greyed out[/FONT]
    [FONT=Arial]· [/FONT][FONT=Arial]banners table shows value 56 for the Next Autoindex but browse button greyed out[/FONT]
    [FONT=Arial]· [/FONT][FONT=Arial]configuration table shows the following warning UNIQUE and INDEX keys should not both be set for column `configuration_key`[/FONT]
    [FONT=Arial]PS – I have also checked the updated SQL script in the Zen Cart 1.3.8 zip files[/FONT]
    [FONT=Arial]Some other details:[/FONT]
    [FONT=Arial]Site: http://www.digitalsaonline.co.za/catalog/[/FONT]
    [FONT=Arial]MySQL - 4.1.20[/FONT]
    [FONT=Arial]phpMyAdmin - 2.8.2.4[/FONT]
    [FONT=Arial]Error occurred on the: 28th June 2008[/FONT]
    [FONT=Arial]System Changes: none what so every prior to error, apart from new banners:[/FONT]
    [FONT=Arial]Other errors:[/FONT]
    [FONT=Arial]Site:[/FONT]
    [FONT=Arial]1062 Duplicate entry '0' for key 1
    in:
    [insert into banners_history (banners_id, banners_shown, banners_history_date) values ('55', 1, now())][/FONT]

    [FONT=Arial]Admin:[/FONT]
    [FONT=Arial]1062 Duplicate entry '0' for key 1
    in:
    [insert into admin_activity_log (access_date, admin_id, page_accessed, page_parameters, ip_address) values (now(), '1', 'store_manager.php', '', '198.54.202.30')]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.[/FONT]

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

    Default Re: 1062 Duplicate entry '0' for key 1 after export/import of database

    Quote Originally Posted by LloydR View Post
    Here is a link to a screenshot of the admin_activity_log

    http://img262.imageshack.us/img262/1...vityloggj1.jpg

    Does any thing look odd?
    Yes ... why is the table empty (0 rows) and created today?
    .

    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.

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

    Default Re: 1062 Duplicate entry '0' for key 1 after export/import of database

    Quote Originally Posted by LloydR View Post
    Please see below for things I have found that look a bit odd while checking each tables “Auto_Increment” is on and that the Next Autoindex number is correct when checking against the primary field under the browse option for that table :
    · featured table shows value 11 for Next Autoindex but the browse option is greyed out
    · products_attributes table shows value 1,104 for Next Autoindex but browse button greyed out
    · specials table shows value 51 for the Next Autoindex but browse button greyed out
    · banners table shows value 56 for the Next Autoindex but browse button greyed out
    If the browse button is greyed out, that means there's no data in the table to be browsed

    Quote Originally Posted by LloydR View Post
    · email_archive table - not found in mysql
    If you're not archiving any emails then that won't matter. But it begs the question of "how" did it disappear? If it's missing during a database-upgrade, you may run into errors that will cause upgrade challenges since it will have to abort mid-stream. Thus I suggest that you recreate it perhaps from a backup.

    Quote Originally Posted by LloydR View Post
    · configuration table shows the following warning UNIQUE and INDEX keys should not both be set for column `configuration_key`
    That's normal, and can be ignored.


    Quote Originally Posted by LloydR View Post
    1062 Duplicate entry '0' for key 1
    in:
    [insert into banners_history (banners_id, banners_shown, banners_history_date) values ('55', 1, now())]
    "key 1" is probably the primary key on the table, which would be the banners_history_id field.
    Since the "insert" statement doesn't mention that field (and this is normal and desired), it is expecting the auto-increment attribute of that field to automatically select the correct next number. So, if you're getting that error on that table, it means the banners_history_id is not set to autoincrement.

    Quote Originally Posted by LloydR View Post
    Admin:
    1062 Duplicate entry '0' for key 1
    in:
    [insert into admin_activity_log (access_date, admin_id, page_accessed, page_parameters, ip_address) values (now(), '1', 'store_manager.php', '', '198.54.202.30')]
    Same issue as mentioned above for banners_history table.


    If it was working flawlessly until a certain date, then unless it's something you or your staff have done to the site, your first line of support for these odd database issues should be your hosting company -- so they can investigate what may be wrong on the server to break the autoincrement funcitonality.
    .

    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.

  6. #36
    Join Date
    Jun 2007
    Location
    SA
    Posts
    91
    Plugin Contributions
    0

    Default Re: 1062 Duplicate entry '0' for key 1 after export/import of database

    Quote Originally Posted by DrByte View Post
    Yes ... why is the table empty (0 rows) and created today?
    I clicked on empty, could that be the issue?

    Thanks for the reply

  7. #37
    Join Date
    Jun 2007
    Location
    SA
    Posts
    91
    Plugin Contributions
    0

    Default Re: 1062 Duplicate entry '0' for key 1 after export/import of database

    Great my hosting company changed servers with our telling me, how nice of them

    So i worked in the wrong DB the whole week end

    Thanks for the help DrByte

  8. #38
    Join Date
    Jun 2008
    Posts
    2
    Plugin Contributions
    0

    Default Re: 1062 Duplicate entry '0' for key 1 after export/import of database

    The problem for me was that there were still entries for old customers sitting in the "customer_info" table. I dropped that and started my 'customers_id' field in the "customers" table at 1 again and it works great. Hope this helps someone.

 

 
Page 4 of 4 FirstFirst ... 234

Similar Threads

  1. Replies: 6
    Last Post: 13 Feb 2013, 06:35 AM
  2. DB Import Error #1062 - Duplicate entry '1' for key 1
    By aushy in forum Installing on a Windows Server
    Replies: 6
    Last Post: 19 Oct 2011, 11:38 AM
  3. SQL Errors when importing to new database - #1062 - Duplicate entry '3' for key 1
    By countingsheep in forum Upgrading from 1.3.x to 1.3.9
    Replies: 3
    Last Post: 17 Sep 2009, 09:43 PM
  4. Replies: 5
    Last Post: 8 Apr 2008, 02:52 PM
  5. '1062 Duplicate entry '0' for key 1' after payment process
    By targetsp in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 18 May 2006, 03:37 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