Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2012
    Posts
    65
    Plugin Contributions
    0

    Default PHP Fatal error: 1062:Duplicate entry '613' for key 'PRIMARY' :: insert into custome

    Guys, Im getting this strange error when somebody makes an account on my zen cart. It results in no shipping or billing address!

    HTML Code:
    [11-Dec-2012 13:41:14] PHP Fatal error:  1062:Duplicate entry '613' for key 'PRIMARY' :: insert into customers_info
    
                              (customers_info_id, customers_info_number_of_logons,
    
                               customers_info_date_account_created, customers_info_date_of_last_logon)
    
                  values ('613', '1', now(), now()) in website.com/includes/classes/db/mysql/query_factory.php on line 120
    I dont think it is the query file is it? What would this mean?

    Many thanks!!!

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

    Default Re: PHP Fatal error: 1062:Duplicate entry '613' for key 'PRIMARY' :: insert into cus

    Customer data is stored in multiple tables: customers, customers_info, address_book, and has additional hooks to other places.

    When a customer creates an account, new records are inserted into all of those tables. But in your case, the error is occurring because a record of that same number already exists. This usually only happens when someone does a mass delete or mass import of data from a small incomplete handful of tables instead of keeping the complete database intact when importing or exporting.

    You'll need to sort out what's wrong in your database tables and sort out why it's already got records for customers that don't already exist.
    .

    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
    Nov 2012
    Posts
    65
    Plugin Contributions
    0

    Default Re: PHP Fatal error: 1062:Duplicate entry '613' for key 'PRIMARY' :: insert into cus

    DrByte,

    Thank you for your reply. I found out the error was from the mod "how_did_you_hear_about_us_v150" which I obtained from the plugin section. I simply removed the code this plugin had written to my tpl_modules_create_account.php and create_account.php and things were back to normal.

    Unsure if it was something I had done or was the plugin that caused the problem though.

 

 

Similar Threads

  1. Replies: 3
    Last Post: 21 Jan 2016, 10:35 PM
  2. Replies: 5
    Last Post: 7 Mar 2015, 07:56 PM
  3. v151 PHP Fatal error:1062:Duplicate entry '1-1' for key 'PRIMARY'
    By Dopefish in forum General Questions
    Replies: 14
    Last Post: 19 Oct 2012, 02:58 AM

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