Thread: Importing data

Results 1 to 10 of 15

Hybrid View

  1. #1
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Importing data into Zen Cart

    [moderator comment]

    Your posts have been moved to their own thread. Hijacking somebody else's thread before their issue has been resolved is not appreciated in this forum, especially when your topic has such a tenuous link to the original.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  2. #2
    Join Date
    Aug 2011
    Posts
    10
    Plugin Contributions
    0

    Default Re: Importing data into Zen Cart

    Quote Originally Posted by kuroi View Post
    [moderator comment]

    Your posts have been moved to their own thread. Hijacking somebody else's thread before their issue has been resolved is not appreciated in this forum, especially when your topic has such a tenuous link to the original.
    My bad, I figured that since he was looking for contracted work that he should do so in the 'Commercial Help Wanted' section. As such, I thought my question was more relevant to his question than his own question since he is not seeming like he'll wants support for it, rather to have somebody else do it. But I digress...

    I'm new to forum posting, where do I go to get to where my link was moved to?

  3. #3
    Join Date
    Aug 2011
    Posts
    10
    Plugin Contributions
    0

    Default Re: Importing data into Zen Cart

    Quote Originally Posted by ConwayMJ View Post
    My bad, I figured that since he was looking for contracted work that he should do so in the 'Commercial Help Wanted' section. As such, I thought my question was more relevant to his question than his own question since he is not seeming like he'll wants support for it, rather to have somebody else do it. But I digress...

    I'm new to forum posting, where do I go to get to where my link was moved to?
    Never mind, I figured it out...

  4. #4
    Join Date
    Aug 2011
    Posts
    10
    Plugin Contributions
    0

    Default Re: Importing data into Zen Cart

    Quote Originally Posted by ConwayMJ View Post
    Never mind, I figured it out...
    To clarify, I figured it out where it got moved to, but I am still having problems with this. Any help would be great. I tried looking up syntax rules in Google and nothing seems to work. If somebody could just show me how the table data replacement function would work using one of the replacement commands in the .sql, that would be uber awesome and I could just replicate the process for the 30 others I need to do... this is so frustrating!

  5. #5
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Importing data

    The error that you're getting appears to relate to the quote character at the beginning of your query.

    Is it possible that you have copied Zen Cart code that wraps the query with a single or double quote, which is being translated into an HTML entity that isn't valid in SQL?

    The back quotes on the individual fields are rarely needed nowadays, at least if you're using a moderately recent version of MySQL.
    Last edited by kuroi; 1 Aug 2011 at 07:38 PM. Reason: update on back quotes
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  6. #6
    Join Date
    Aug 2011
    Posts
    10
    Plugin Contributions
    0

    Default Re: Importing data

    REPLACE `zen_banners` (`banners_id`, `banners_title`, `banners_url`, `banners_image`, `banners_group`, `banners_html_text`, `expires_impressions`, `expires_date`, `date_scheduled`, `date_added`, `date_status_change`, `status`, `banners_open_new_windows`, `banners_on_ssl`, `banners_sort_order`) VALUES
    (1, 'Wear', 'index.php', 'banner1.jpg', 'banner-1', '', 0, NULL, NULL, '0001-01-01 00:00:00', NULL, 1, 0, 1, 0),
    (2, 'Unwind', 'index.php?main_page=product_info&cPath=7&products_id=13', 'banner2.jpg', 'banner-2', '', 0, NULL, NULL, '0001-01-01 00:00:00', NULL, 1, 0, 1, 0),
    (3, 'Survive ', 'index.php?main_page=product_info&cPath=7&products_id=11', 'banner3.jpg', 'banner-3', '', 0, NULL, NULL, '0001-01-01 00:00:00', NULL, 1, 0, 1, 0),
    (4, 'COBRABRAID', 'index.php?main_page=product_info&cPath=7&products_id=11', 'banner4.jpg', 'banner-4', '', 0, NULL, NULL, '0001-01-01 00:00:00', NULL, 1, 0, 1, 0),
    (5, 'Nike Running', 'index.php?main_page=product_info&cPath=7&products_id=11', 'banner5.jpg', 'SideBox-Banners', '', 0, NULL, NULL, '0001-01-01 00:00:00', NULL, 1, 0, 1, 0);
    I tried removing those backward apostraphe's and importing it but it did not work. I am not seeing any unneccessary single or double quotes, just the unneccesary `s that I tried removing but I still got the same error.

    When I open up the .sql, it opens up in Excel and it goes:

    REPLACE affected_table (column headers) VALUES

    then on separate lines it goes:

    (value1,value2,etc),
    (value1-2,value2-2,etc),
    (etc);

    could it be because it is not all on the same line?
    Last edited by ConwayMJ; 1 Aug 2011 at 07:49 PM. Reason: needed to change somethign?

  7. #7
    Join Date
    Aug 2011
    Posts
    10
    Plugin Contributions
    0

    Default Re: Importing data

    Quote Originally Posted by kuroi View Post
    The error that you're getting appears to relate to the quote character at the beginning of your query.

    Is it possible that you have copied Zen Cart code that wraps the query with a single or double quote, which is being translated into an HTML entity that isn't valid in SQL?
    There is no quotes in the beginning of the query when I open it up in Excel... I also am not seeing a quote character at the beginning of the query?


  8. #8
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Importing data

    The SQL that you've posted is OK and would work provided your banners table has a zen_ prefix.

    You've said that you keep getting the same error, but you haven't said what the error is when you use the REPLACE version of your query, so it's difficult to provide any help on it.

    And I don't understand why you keep opening the query in Excel. Excel has its own way of interpreting data that render is an unreliable way of viewing raw data or code.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

 

 

Similar Threads

  1. Importing Shopify data?
    By frank18 in forum General Questions
    Replies: 3
    Last Post: 28 May 2014, 10:46 AM
  2. Importing Data
    By ysmith877 in forum Setting Up Categories, Products, Attributes
    Replies: 9
    Last Post: 19 Nov 2013, 11:20 PM
  3. Help importing data
    By Stevis2002 in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 17 Feb 2011, 06:20 PM
  4. Trouble importing data
    By isaacr25 in forum Installing on a Linux/Unix Server
    Replies: 27
    Last Post: 17 Oct 2007, 04:23 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