Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2011
    Location
    Finland
    Posts
    18
    Plugin Contributions
    0

    help question Problem with SQL import

    Hi,

    I had an old zen cart sql table with products.
    Now I downloaded my new zen cart sql table and added the old products with copy paste. I corrected some lines so that the categories id etc woud be as in my new zen cart table.

    When I try to import it via phpmy admin I get this error:
    Virhe

    SQL-kysely:

    -- -- Vedos taulusta `znc_products_description` -- INSERT INTO `znc_products_description` (`products_id`, `language_id`, `products_name`, `products_description`, `products_url`, `products_viewed`) VALUES (319, 2, 'Ylang Ylang ja Appelsiini Aromaterapia Saippua', 'Tämän saippuan aromaterapiaöljy: Ylang Ylang ja Appelsiini Väri: Punainen<br />Vaikutus: Appelsiini: mielialaa kohottamaan, rentoutumiseen, stressiin, hermostuneisuuteen, \r\nvatsa- ja kuukautiskipuihin. Tehostaa ruoansulatusta ja lisää \r\nruokahalua.<br />Ylang Ylang: Vahvistava ja rauhoittava vaikutus verenkiertoon. Se myös tyynnyttää \r\nhermostoa ja kohottaa mielialaa. öljyllä on antiseptisia vaikutuksia. \r\nYlang Ylang-öljy auttaa stressiin ja lievään masennukseen, \r\nhermostollisiin sydän-ym oireisiin, frigiditettiin ja impotenssiin sekä \r\nrauhattomaan ja turhautuneeseen oloon.<br />Paino n. 2 Kg. Saat patukasta 13 n. 153g palaa.<br />Toimitusaika n. 2 viikkoa.<br /><br /><span style="font-weig[...]

    MySQL ilmoittaa: Ohjeet
    #1062 - Duplicate entry '284-1' for key 'PRIMARY'

    I have looked and it´s not duplicated.

    I have also tryied deleting all the existing products an categories and then importing again and I get this same error.

    I have tryied by deleting that product (id319) but then I get error from the next line.

    I have zen cart in two languages but only using language id2 finnish.

    Where should I look and what do I have to correct??

  2. #2
    Join Date
    Dec 2011
    Location
    Finland
    Posts
    18
    Plugin Contributions
    0

    Default Re: Problem with SQL import

    I solved it :) But don´t know how to delete my post???

  3. #3
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Problem with SQL import

    You can't delete a post, but a description of how you solved the problem might help someone else.

  4. #4
    Join Date
    Dec 2011
    Location
    Finland
    Posts
    18
    Plugin Contributions
    0

    Default Re: Problem with SQL import

    Right! Sorry :)

    It was so easy as delete the second language product description line.

    I had for example:

    product id 319, lang id 2, xxxxxxxxx
    product id 319, lang id 1, xxxxxxxx

    I deleted the second line f every product ( as I´m using lang id 2) and then imported and now I can see my products perfectly :)


    Also as a tip, yesterday I just copy pasted without doing/changing nothing on the language id number. So I was able to see on my home page and in admin that in the category x I had x number of products, but then if I clicked on the category I didn´t see nothing.
    The problem was that on my old zen cart database I had only one language with id number 1. So now when I copy pasted I had to change that number 1 for each product line to number 2. And now I´m able to see them.

 

 

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. Extra spacing with SQL export/import
    By Get Em Fast in forum General Questions
    Replies: 10
    Last Post: 9 Jul 2008, 05:13 PM
  3. Problem with installation of quick book import(QBI)
    By kalyani in forum Installing on a Linux/Unix Server
    Replies: 0
    Last Post: 6 Mar 2007, 01:30 PM
  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 problem
    By quantum in forum General Questions
    Replies: 6
    Last Post: 22 Jul 2006, 10:37 AM

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