Page 1 of 3 123 LastLast
Results 1 to 10 of 28
  1. #1
    Join Date
    Jul 2007
    Posts
    172
    Plugin Contributions
    0

    Default Trouble importing data

    Hi guys,
    I'm following directions using this article:
    http://www.zen-cart.com/wiki/index.p...Switch_Servers

    When I try importing my data (data exported from my "old" domain, last step in step 5), I get the following error. Please advise. Thanks.

    Error
    SQL query:

    --
    -- Dumping data for table `address_book`
    --
    INSERT INTO `address_book` ( `address_book_id` , `customers_id` , `entry_gender` , `entry_company` , `entry_firstname` , `entry_lastname` , `entry_street_address` , `entry_suburb` , `entry_postcode` , `entry_city` , `entry_state` , `entry_country_id` , `entry_zone_id` )
    VALUES (

    '1', '1', 'm', , 'John', 'Doe', 0x3131312054657374204c616e65, '', '31000', 'Nowhere', '', '223', 19
    );



    MySQL said:

    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 'John', 'Doe', 0x3131312054657374204c616e65, '', '31000', 'Nowhere', '', '223',' at line 2

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Trouble importing data

    If you look at the data: '1', '1', 'm', , 'John' ... you'll see that there are two commas with no data in between. This is where the company name should appear in quotes.
    How did that go missing?

    Either you have a bad backup or someone/something has made incorrect edits to your backup SQL file and removed the information. Did you do a search/replace on the file for some reason?

    I suggest you start with another backup...
    .

    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
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Trouble importing data

    If using phpmyadmin to create the backup are you including these options
    Code:
    Structure
    Add DROP TABLE
    Add IF NOT EXISTS
    Add AUTO_INCREMENT value
    
    Add CREATE PROCEDURE / FUNCTION
    
    Data
    Complete inserts
    Extended inserts
    Maximal length of created query
    
    Use hexadecimal for binary fields
    DrByte to the rescue
    Zen-Venom Get Bitten

  4. #4
    Join Date
    Jul 2007
    Posts
    172
    Plugin Contributions
    0

    Default Re: Trouble importing data

    Quote Originally Posted by DrByte View Post
    If you look at the data: '1', '1', 'm', , 'John' ... you'll see that there are two commas with no data in between. This is where the company name should appear in quotes.
    How did that go missing?

    Either you have a bad backup or someone/something has made incorrect edits to your backup SQL file and removed the information. Did you do a search/replace on the file for some reason?

    I suggest you start with another backup...
    I don't believe that this information was entered during the install, so it never entered the database. I'll try entering it in admin and then doing another backup. This should do it, correct?

  5. #5
    Join Date
    Jul 2007
    Posts
    172
    Plugin Contributions
    0

    Default Re: Trouble importing data

    Ok,
    Never mind my last post. The company info IS in zen cart admin. I did another update using the recommended settings, and I still get the same error. What else could it be?

  6. #6
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Trouble importing data

    Are you using phpMyAdmin to do the restore? If not, you should.
    Don't use SQL Patch tool for database restores. It's not designed for that.
    .

    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
    Jul 2007
    Posts
    172
    Plugin Contributions
    0

    Default Re: Trouble importing data

    Dr. Byte,
    Yes, I am usingn phpMyAdmin for all my database tasks.

    Comment:
    On the new installation of zen cart, I left the Company Name, address etc as the default. Could this have something to do with it? Thanks.

  8. #8
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Trouble importing data

    Quote Originally Posted by isaacr25 View Post
    On the new installation of zen cart, I left the Company Name, address etc as the default. Could this have something to do with it? Thanks.
    No, that would have nothing to do with customer address records completely missing company field data during a database export.
    .

    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.

  9. #9
    Join Date
    Jul 2007
    Posts
    172
    Plugin Contributions
    0

    Default Re: Trouble importing data

    Any more ideas as to what I can do?

  10. #10
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Trouble importing data

    Quote Originally Posted by isaacr25 View Post
    --
    -- Dumping data for table `address_book`
    --
    INSERT INTO `address_book` ( `address_book_id` , `customers_id` , `entry_gender` , `entry_company` , `entry_firstname` , `entry_lastname` , `entry_street_address` , `entry_suburb` , `entry_postcode` , `entry_city` , `entry_state` , `entry_country_id` , `entry_zone_id` )
    VALUES (

    '1', '1', 'm', , 'John', 'Doe', 0x3131312054657374204c616e65, '', '31000', 'Nowhere', '', '223', 19
    );
    Is that how your export file reads?
    What does the next line say?
    .

    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.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Importing Data
    By ysmith877 in forum Setting Up Categories, Products, Attributes
    Replies: 9
    Last Post: 19 Nov 2013, 11:20 PM
  2. Easy populate trouble importing
    By bridge32 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 23 Sep 2012, 01:44 PM
  3. Trouble importing old database
    By countingsheep in forum Installing on a Windows Server
    Replies: 11
    Last Post: 12 Oct 2011, 05:37 AM
  4. Importing data
    By ConwayMJ in forum Setting Up Categories, Products, Attributes
    Replies: 14
    Last Post: 2 Aug 2011, 12:29 PM
  5. Having trouble importing my database
    By pharry in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 22 Jun 2009, 11:14 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR