Thread: Error 1064

Results 1 to 5 of 5
  1. #1

    Default Error 1064

    Hello everyone!

    First of all, I am new to zen cart and this is my first post. Please forgive me if this question has been asked before, but I couldn't directly find any posts with a solution to my problem.

    My problem is, that when I add products to my sub-categories, I get the following error message:

    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 ')' at line 7 in:
    [select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, p.products_date_added, p.products_price, p.products_type, p.master_categories_id from products p, products_description pd where p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = 1 and p.products_id in ()]


    The categories structure to my site (currently) is as follows:

    Category 1 -
    1. Sub-Category 1
    2. Sub-Category 2



    Category 2 -
    1. Sub-Category 1 -
      • Product 1
      • Product 2

    2. Sub-Category 2


    Category 3 -
    1. Sub-Category 1
    2. Sub-Category 2



    I've googled the problem, and can't find anyone with a solution, although I did find a number of websites with the same problem. On a different forum post, it was recommended (as a temporary measure) to turn on strict error reporting.

    Here's a link to my site where the error message is displayed: http://www.my-cpu.com/index.php?main...index&cPath=69

    The website is still in development, but I have noticed that on every page that this error message is displayed, both "navColumnTwo" & the "footer" are now not displayed. I'm very confused and i'm hoping someone can help me with this problem.

    Thanks in advance!

    Shaun.

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

    Default Re: Error 1064

    That's your "New Products" center-box trying to output data but having trouble finding suitable data.

    How did you get your products and categories into your store? Did you enter them by hand using the Admin Categories/Products screens? Or some other way?

    What have you set for the "new products" criteria?
    http://www.zen-cart.com/content.php?...r-xxxxx-month)
    http://www.zen-cart.com/content.php?...ducts-sections

    What addons have you installed?
    .

    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

    Default Re: Error 1064

    Hi DrByte,

    First of all, thank you for your response.

    I got the products onto my store using the Admin Panel "Categories/Products Pages".

    The criteria set for the "new products" are as follows:
    - New Product Listing - Limited to "0" (all products)
    - Index Listing - Everything is set to "show" other than "Filter Product Listing for Current Top Level Category When Enabled" which is set to "0"

    I currently have no addons installed.

    I'm not really sure what file/files I should be looking for, but I have compared my "tpl_modules_products_new_listing.php" & "tpl_products_new_default.php" files to the original Zen Cart files using "kdiff3", which display that there are no differences between mine and the original.

    Are there any other files that I should be comparing?

    Thanks,

    Shaun.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,363
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Error 1064

    Okay, if you've not installed any addons, then which files have you changed, or added, and why? Starting with anything under the /includes/ folder.

    I can't recreate your symptoms on my fresh clean install of v1.5.0, and thousands of live stores aren't reporting the problem.

    http://www.zen-cart.com/wiki/index.p...Obscure_Issues
    .

    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

    Default Re: Error 1064

    Hi DrByte,

    I've just managed to resolve my problem! Using a file comparison app, it displayed that 3 lines differed on my "new_products.php" within "includes/modules/MY_CUSTOM_TEMPLATE/". These 3 errors included:

    Line #38 $list_of_products = substr($list_of_products, 0, 0); // remove trailing comma
    Line #75 if ($col > (SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS - 0)) {
    Line #89 $zc_show_new_products = false;


    The Correct lines are:

    Line #38 $list_of_products = substr($list_of_products, 0, -2); // remove trailing comma
    Line #75 if ($col > (SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS - 1)) {
    Line #89 $zc_show_new_products = true;


    Thank you for you help!

    Shaun.

 

 

Similar Threads

  1. Fatal error: mysql error (1064 error) -- v1.0-alpha
    By Dale Schibbelhut in forum General Questions
    Replies: 9
    Last Post: 18 Nov 2010, 08:08 PM
  2. Error with new install 1.3.9d 1064 error in SQL syntax
    By Joseph M in forum Installing on a Linux/Unix Server
    Replies: 21
    Last Post: 28 Jun 2010, 06:36 PM
  3. Error message 1064 you have an error in your sql syntax
    By honrheart in forum General Questions
    Replies: 1
    Last Post: 11 Sep 2009, 02:38 AM
  4. MySQL Error 1064 You have an error in your SQL syntax;
    By dmm2020 in forum General Questions
    Replies: 2
    Last Post: 22 Feb 2009, 05:02 AM
  5. error message 1064 you have an error in your sql syntax
    By ngsl in forum General Questions
    Replies: 0
    Last Post: 22 Aug 2008, 06:44 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