Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2005
    Location
    Iowa
    Posts
    47
    Plugin Contributions
    0

    Default Error with SQL database import

    I'd like to import my products from one database into another as I've been setting up a new shop. However, I keep getting this error:

    Error

    SQL query:

    INSERT INTO `zen_products`
    VALUES ( 1, 1, 0, '37351', 'products/37351.gif', 99.9500, 0, '2006-09-14 16:56:02', '2006-09-14 17:04:39', NULL , 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 99.9500, 24, 1, 0, 0, 0, 0, 0 ) ;

    MySQL said: Documentation
    #1136 - Column count doesn't match value count at row 1


    Is there a way I can fix this so I can import my products? The thought of having to add over 4000 items by hand is not a fun thought to have.

  2. #2
    Join Date
    Jun 2005
    Location
    Iowa
    Posts
    47
    Plugin Contributions
    0

    Default Re: Error with SQL database import

    I posted this in the wrong forum, didn't I.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Error with SQL database import

    It sounds like you're attempting to import from a database designed for a different version of Zen Cart or one on which you had installed a contribution that had altered the structure of the table you're importing.

    Thus, since you're only specifying the data to import, and not the columns into which the data should be placed, and you have more columns in your data list than the database you're importing into contains, you're getting the error message indicated.

    Try exporting your backup database using "complete inserts".
    At least that way when you do the import you'll get an error telling you which column is not acceptable in the new database.

    Better yet, resolve the structural differences between your databases, and then the import will run smoothly.

    You might find some tidbits in this article:
    https://www.zen-cart.com/tutorials/index.php?article=10
    .

    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.

  4. #4
    Join Date
    Jun 2005
    Location
    Iowa
    Posts
    47
    Plugin Contributions
    0

    Default Re: Error with SQL database import

    Thank you :)

 

 

Similar Threads

  1. Need help with import a large SQL database
    By shahram in forum General Questions
    Replies: 0
    Last Post: 30 Dec 2009, 11:24 AM
  2. Possible to import products from seperate sql database?
    By gat0man in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 15 Oct 2008, 09:46 AM
  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. How to import SQL file to Database?
    By lina0962 in forum Addon Shipping Modules
    Replies: 1
    Last Post: 5 Jan 2007, 11:18 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