Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Apr 2005
    Location
    TN
    Posts
    94
    Plugin Contributions
    0

    Default 1064 You have an error in your SQL syntax;

    I have read through every question regarding this error on the forum and none of the solutions address my issue. Basically I get an error whenever i try to access any "Special" such as Specials, new products, featured products etc.

    Here is the full error message when trying to access New Products

    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 '*) as total FROM zen_products p left join zen_manufacturers m on (p.manufacture' at line 1
    in:
    [select count(distinct *) as total FROM zen_products p left join zen_manufacturers m on (p.manufacturers_id = m.manufacturers_id) left join zen_products_to_categories p2c on p.products_id = p2c.products_id left join zen_products_description pd on p.products_id = pd.products_id WHERE p.products_status = 1 AND pd.language_id = 1 ]

    Here is the full error message when trying to access Specials
    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 '*) as total FROM zen_products p LEFT JOIN zen_specials s on p.products_id = s.p' at line 1
    in:
    [select count(distinct *) as total FROM zen_products p LEFT JOIN zen_specials s on p.products_id = s.products_id LEFT JOIN zen_products_description pd on p.products_id = pd.products_id LEFT JOIN zen_manufacturers m on p.manufacturers_id = m.manufacturers_id LEFT JOIN zen_products_to_categories p2c on p.products_id = p2c.products_id WHERE p.products_status = '1' AND s.status = 1 AND pd.language_id = 1]

    And for Featured Products
    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 '*) as total FROM zen_products p LEFT JOIN zen_manufacturers m on p.manufacturer' at line 1
    in:
    [select count(distinct *) as total FROM zen_products p LEFT JOIN zen_manufacturers m on p.manufacturers_id = m.manufacturers_id LEFT JOIN zen_featured f on p.products_id = f.products_id LEFT JOIN zen_products_to_categories p2c on p.products_id = p2c.products_id LEFT JOIN zen_products_description pd on p.products_id = pd.products_id WHERE p.products_status = 1 and f.status = 1 and pd.language_id = 1 ]


    I do use Easy Populate to load my products if this would make any reason why this is happening.
    I will admit I am a bit braindead when it comes to mysql - any help would be greatly appreciated.

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: 1064 You have an error in your SQL syntax;

    What VERSION of:

    Zencart
    PHP
    MySQL
    20 years a Zencart User

  3. #3
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: 1064 You have an error in your SQL syntax;

    And also :

    what template?
    what addons that might effect these pages?

    this bit of the sql statements is going to create an error:

    Code:
    select count(distinct *)
    And it is not standard in any version I know of.

 

 

Similar Threads

  1. v151 1064:You have an error in your SQL syntax;
    By holsterland in forum General Questions
    Replies: 5
    Last Post: 5 May 2014, 11:58 PM
  2. v139h 1064 You have an error in your SQL syntax
    By uniquely in forum Basic Configuration
    Replies: 6
    Last Post: 12 Jun 2012, 04:16 PM
  3. 1064 You have an error in your SQL syntax
    By Delights in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 8 Aug 2010, 10:06 PM
  4. 1064 You have an error in your SQL syntax
    By phastings in forum General Questions
    Replies: 1
    Last Post: 18 Dec 2008, 06:12 AM
  5. 1064 You have an error in your SQL syntax;
    By aerosmith in forum General Questions
    Replies: 3
    Last Post: 3 Sep 2008, 06:55 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