Results 1 to 7 of 7
  1. #1
    Join Date
    May 2005
    Posts
    139
    Plugin Contributions
    0

    Default SQL Import problem

    Hello,

    I am changing zencart from one server to another, and I am using myphpadmin as the interface for moving the back end data. The first table I imported was cart_categories_description, and everything went across smoothly into the sql database.

    My problems lies in the fact that I go to the admin section of zencart, and none of the records I imported display under categories.

    I tried adding one manually in the admin section, and it gives me an error of: 1062 Duplicate entry '1-1' for key 1.

    When I go back to the categories page, the 1st record that is sitting in the sql database is now showing. Same thing happened for the next 3 tries of the same thing.

    Any ideas why this is happening?

    Thanks in advance.

    Andrew

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: SQL Import problem

    This is likely a result of not importing all the related tables together.
    You're better off moving the entire database, rather than selective files.

    If you insist that you must do individual tables, you can do a selective import using this list as a guide:
    http://www.zen-cart.com/wiki/index.p...atabase_Schema
    .

    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
    May 2005
    Posts
    139
    Plugin Contributions
    0

    Default Re: SQL Import problem

    Hi Dr Byte,

    I actually just found http://www.zen-cart.com/wiki/index.p...Switch_Servers about an hour ago and am working through that at the moment. I hadn't realised that I could do the whole lot at once, which is much better!

    As I have gone to run the fix_chache_key.php, I am getting the following error:

    1054 Unknown column 'startdate' in 'field list'
    in:
    [select startdate, counter, session_counter from counter_history where startdate='20060722']

    So trying to work out why that is happening at the moment...

  4. #4
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: SQL Import problem

    Quote Originally Posted by quantum
    1054 Unknown column 'startdate' in 'field list'
    in:
    [select startdate, counter, session_counter from counter_history where startdate='20060722']
    That means you're trying to run 1.3 code using a 1.2 database.
    Go to the zc_install folder and run database-upgrade to bring it up-to-date.
    .

    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. #5
    Join Date
    May 2005
    Posts
    139
    Plugin Contributions
    0

    Default Re: SQL Import problem

    Hi Dr Byte,

    Thanks very much!! That fixed the problem. This was the first time I had done this, and I was very amused to see that it allows me to add a table prefix on in this update. I had just finished manually adding the prefix in phpadmin for each table! So much fun! :o/

    Is it normal after this db update that the shop front looks like it no longer as the style sheet controlling the look and feel?

  6. #6
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: SQL Import problem

    Quote Originally Posted by quantum
    Is it normal after this db update that the shop front looks like it no longer as the style sheet controlling the look and feel?
    There are a lot of visual differences as a result of the template overhaul that happened in 1.3.
    Your best choice is to rebuild the template. There are some good examples in the "Contributed Templates" area of the forum, with discussion on using them.
    .

    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.

  7. #7
    Join Date
    May 2005
    Posts
    139
    Plugin Contributions
    0

    Default Re: SQL Import problem

    Hi Dr Byte,

    I actually built this in 1.3, and just realised that it was reverting to a different template in admin, which was stored in the database! It is all good now.

    Thank you so much for your help, I would have been stuffed with out it! :)

 

 

Similar Threads

  1. Problem with SQL import
    By tragosina in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 18 Dec 2011, 03:19 PM
  2. NY Sales Tax SQL Import
    By DigDug in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 20 Nov 2010, 11:15 PM
  3. SQL Import Error - Somewhat Urgent
    By DieuxSoldat_04 in forum Installing on a Linux/Unix Server
    Replies: 9
    Last Post: 10 Oct 2008, 08:54 AM
  4. Error with SQL database import
    By LadySyren in forum General Questions
    Replies: 3
    Last Post: 26 Dec 2006, 03:21 PM
  5. sql import process...LONG?
    By Stuck in forum General Questions
    Replies: 1
    Last Post: 16 Jul 2006, 10:52 PM

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