Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: Upgrade from modified eCommerce Shopsoftware 1.03 to 1.04 gives MySQL #1062 Error

    Bruce Neale

    • Neu im Forum
    • Beiträge: 34
    • Geschlecht:
    I am updating a shop running modified eCommerce Shopsoftware 1.03

    I wish to upgrade it to modified eCommerce Shopsoftware 1.04

    It is running as a subdomain.
    Host = HostGator
    MySQL = 5.1.47
    phpMyAdmin = 3.2.4
    PHP = 5.2.4
    This is what I have done:-

    1. Full Backup

    2. Modules> Payment modules> Uninstall
       moneybookers
       paypal
       sofortüberweisung

    3. FTP> modified eCommerce Shopsoftware-1.04 + Overwrite Files & Folders

    4. Import MySQL database from xtc_installer folder> update_1.03_to_1.04.sql

    I get the following Error from the phpMyAdmin when I import the .sql file

    Error:
    SQL query:

    INSERT INTO zones( zone_id, zone_country_id, zone_code, zone_name )
    VALUES (
    '', '222', 'BDF', 'Bedfordshire'
    );

    MySQL said: Documentation
    #1062 - Duplicate entry '0' for key 'PRIMARY'
    How do I solve this problem?

    Many thanks, Bruce



    Linkback: https://www.modified-shop.org/forum/index.php?topic=6504.0

    DokuMan

    • modified Team
    • Beiträge: 6.669
    • Geschlecht:
    Are you sure that you executed the following statement prior to all others:

    Code: PHP  [Auswählen]
    delete from zones where zone_country_id = '222';
     
    Your error message indicates, that the old values still exist in the database.
    Execute the above statement and retry the SQL-update again.

    Since you are already updating your database, also make sure to include the recently released "country"-table fix, available here: BUGFIX: Fehlzuordnung Staaten-Regionen

    Please report feedback whether your problem still persists or not :)

    Bruce Neale

    • Neu im Forum
    • Beiträge: 34
    • Geschlecht:
    This Error message came immediately when I used the "Import" tab on phpMyAdmin to upload the file:
    update_1.03_to_1.04.sql

    regards, Bruce

    Bruce Neale

    • Neu im Forum
    • Beiträge: 34
    • Geschlecht:
    Hi,
    I have run this through a couple of times. This is what I get with the first step:

    1 row(s) deleted. ( Query took 0.0005 sec )

    Code: SQL  [Auswählen]
    DELETE FROM zones WHERE zone_country_id = '222'
     
    Then I have the same Error when I try to Import the SQL update.

    regards, Bruce

    DJ-Ready

    • Mitglied
    • Beiträge: 218
    • Geschlecht:
    a quick and dirty fix would be dropping the whole zones table and importing it from the full 1.04 installation. Unless you've added custom zones in which case you'd loose custom changes but thats doubtfull anyways :)

    Bruce Neale

    • Neu im Forum
    • Beiträge: 34
    • Geschlecht:
    That seems like a good idea, because I have 2 shops I need to upgrade and there is very little done to them and they both show the same Error code.
    I tried a new install of 1.04 a few weeks ago and that worked well.

    But the new install goes through the database upgrades, so I don't know how to isolate this data for the Zones.

    regards, Bruce

    Tomcraft

    • modified Team
    • Gravatar
    • Beiträge: 46.369
    • Geschlecht:
    Backup your database and then empty the table "zones" and import the attached zones.sql.txt into your database. ;-)

    Best regards

    Torsten

    Bruce Neale

    • Neu im Forum
    • Beiträge: 34
    • Geschlecht:
    I think I must be doing something wrong, because each time I get the same Error.

    1. I drop the "zones" from phpMyAdmin

    2. I import the new "zones.sql" with phpMyAdmin

    3. I import the "update_1.03_to_1.04.sql"

    I have also tried to import the bugfix.sql, but no change to the resulting Error.

    regards, Bruce

    DJ-Ready

    • Mitglied
    • Beiträge: 218
    • Geschlecht:
    try this update_1.03_to_1.04.sql file. Its the same as the original one but without the zones table related data since thats in the zones.sql.txt already.

    Bruce Neale

    • Neu im Forum
    • Beiträge: 34
    • Geschlecht:
    Thats great - this shop is now working.

    Thanks very much!

    Should the Bugfix.sql also be done or was that already included?

    Regards
    Bruce

    DJ-Ready

    • Mitglied
    • Beiträge: 218
    • Geschlecht:
    No idea. What happens if you try to run it? ^_^

    Tomcraft

    • modified Team
    • Gravatar
    • Beiträge: 46.369
    • Geschlecht:
    The country-fix wasn't included. I did that for you.

    Best regards

    Torsten

    5 Antworten
    2148 Aufrufe
    10. August 2021, 09:38:04 von hbauer
    17 Antworten
    12312 Aufrufe
    26. Februar 2014, 17:27:10 von webald
    1 Antworten
    2382 Aufrufe
    07. November 2013, 15:32:28 von nanni