Forums / General Questions / 1062 Duplicate entry '0' for key 1

1062 Duplicate entry '0' for key 1

Locked

Views: 2,850

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
11 Jul 2006, 7:02 PM
#1
knitengale avatar

knitengale

New Zenner

Join Date:
Jun 2006
Posts:
6
Plugin Contributions:
0

1062 Duplicate entry '0' for key 1

I am having a hell of a time with this error and can't for the life of me figure out what to do to fix it. the shop is https://www.soulsisterz.biz.

When logging into to admin portion of the website I am able to get to the ZENCART admin home page, but once inside ANYWHERE I try to go gives me the follwoign error:

1062 Duplicate entry '0' for key 1

I need to get this fixed ASAP. Please, please somebody help me!

11 Jul 2006, 7:27 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: 1062 Duplicate entry '0' for key 1

This is most likely a result of moving your database from one server to another.

You didn't say which version of Zen Cart you're running.

However, running the queries in this post via phpMyAdmin should resolve the issue for you:
http://www.zen-cart.com/forum/showpost.php?p=215391&postcount=17

.
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.

11 Jul 2006, 7:30 PM
#3
knitengale avatar

knitengale

New Zenner

Join Date:
Jun 2006
Posts:
6
Plugin Contributions:
0

Re: 1062 Duplicate entry '0' for key 1

PLease advise on how to insert the script you directed me too. I am not certain where I am supposed to put that.

11 Jul 2006, 7:54 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: 1062 Duplicate entry '0' for key 1

  • open phpMyAdmin (supplied by your hosting company)
    • select the database used by your store, from the dropdown menu
    • click on the "SQL" tab
    • paste the query statements into the text field
    • click Go

If you are using a version of Zen Cart prior to v1.3, then you may get an error about certain tables not existing. Identify the table that is mentioned in the error message, and re-paste all the statements AFTER that one and click Go again ...

.
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.

11 Jul 2006, 8:27 PM
#5
knitengale avatar

knitengale

New Zenner

Join Date:
Jun 2006
Posts:
6
Plugin Contributions:
0

Re: 1062 Duplicate entry '0' for key 1

Ok, just ran the script and received this error:

SQL query:

ALTER TABLE ezpages CHANGE COLUMN pages_id pages_id int( 11 ) NOT NULL AUTO_INCREMENT

MySQL said: Documentation
#1146 - Table 'sscat.ezpages' doesn't exist

11 Jul 2006, 9:44 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: 1062 Duplicate entry '0' for key 1

Exactly my point earlier:

DrByte:

If you are using a version of Zen Cart prior to v1.3, then you may get an error about certain tables not existing. Identify the table that is mentioned in the error message, and re-paste all the statements AFTER that one and click Go again ...

So ... find the line in that list that mentions ezpages ... and then copy/paste everything from AFTER that line in phpMyAdmin, and Go again.

.
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.

11 Jul 2006, 9:44 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: 1062 Duplicate entry '0' for key 1

.... and then check your admin for proper operation

.
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.

11 Jul 2006, 10:08 PM
#8
knitengale avatar

knitengale

New Zenner

Join Date:
Jun 2006
Posts:
6
Plugin Contributions:
0

Re: 1062 Duplicate entry '0' for key 1

Excellent. Thanks!!:thumbsup:

11 Jul 2006, 11:50 PM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: 1062 Duplicate entry '0' for key 1

BTW, moving this out of bug reports, as it appears to have been a data-migration issue related to server MySQL version incompatibilities during transition.

.
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.