Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2005
    Location
    Perth, Western Australia, Australia
    Posts
    780
    Plugin Contributions
    0

    red flag 1064 You have an error in your SQL syntax: "limit -3"

    Hi,

    There is this error at the View Cart page after adding items to cart. The shipping estimator is also missing. How do we fix this problem?

    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 '-3)' at line 1
    in:
    [(select p.products_id, p.products_image from zen_products_xsell xp, zen_products p, zen_products_description pd where xp.products_id = '23287' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from zen_products_xsell xp, zen_products p, zen_products_description pd where xp.products_id = '24611' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from zen_products_xsell xp, zen_products p, zen_products_description pd where xp.products_id = '11833' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from zen_products_xsell xp, zen_products p, zen_products_description pd where xp.products_id = '11831' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from zen_products_xsell xp, zen_products p, zen_products_description pd where xp.products_id = '24487' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from zen_products_xsell xp, zen_products p, zen_products_description pd where xp.products_id = '28322' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from zen_products_xsell xp, zen_products p, zen_products_description pd where xp.products_id = '23285' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from zen_products_xsell xp, zen_products p, zen_products_description pd where xp.products_id = '24688' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from zen_products_xsell xp, zen_products p, zen_products_description pd where xp.products_id = '24675' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from zen_products_xsell xp, zen_products p, zen_products_description pd where xp.products_id = '11863' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from zen_products_xsell xp, zen_products p, zen_products_description pd where xp.products_id = '25617' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from zen_products_xsell xp, zen_products p, zen_products_description pd where xp.products_id = '28095' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit -3)]
    The Team Behind DealByEthan.com | Curating unique finds for a discerning community. Committed to a seamless and inspiring shopping experience. Connect with us: https://linktr.ee/dealbyethan


  2. #2
    Join Date
    Dec 2006
    Location
    Seligman, MO U.S.A.
    Posts
    2,101
    Plugin Contributions
    5

    Default Re: 1064 You have an error in your SQL syntax: "limit -3"

    Looks like Product 28095 has a limit of -3 in xsell. You can't have a limit set to a negative number -3. Change that limit, and you should be good.
    Teach them to shop and they will shop today;
    Teach them to Zen and they will OWN a shop tomorrow!

  3. #3
    Join Date
    Dec 2005
    Location
    Perth, Western Australia, Australia
    Posts
    780
    Plugin Contributions
    0

    red flag Re: 1064 You have an error in your SQL syntax: "limit -3"

    Looks like Product 28095 has a limit of -3 in xsell. You can't have a limit set to a negative number -3. Change that limit, and you should be good.
    How do we change that? We don't remember setting the limit. From memory the error occurs randomly to other products too.
    The Team Behind DealByEthan.com | Curating unique finds for a discerning community. Committed to a seamless and inspiring shopping experience. Connect with us: https://linktr.ee/dealbyethan


  4. #4
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: 1064 You have an error in your SQL syntax: "limit -3"

    This is the same problem that you had in this thread

    http://www.zen-cart.com/forum/showthread.php?t=137536

    with probably the same (or a similar) solution that I suggested then.

    Its a maths bug in this mod.
    you either fix the maths problem......
    or add a quick fix that stops the limit going less than 1

 

 

Similar Threads

  1. Inatall error "1064 You have an error in your SQL syntax"
    By StatoLNL in forum Installing on a Linux/Unix Server
    Replies: 0
    Last Post: 14 Aug 2011, 08:48 AM
  2. 1064 You have an error in your SQL syntax;
    By larryr99 in forum General Questions
    Replies: 1
    Last Post: 14 Apr 2011, 07:11 AM
  3. "1064 You have an error in your SQL syntax;
    By webbuyer in forum General Questions
    Replies: 1
    Last Post: 1 Jul 2010, 07:46 AM
  4. Replies: 2
    Last Post: 16 Sep 2009, 06:15 PM
  5. Replies: 2
    Last Post: 25 Feb 2007, 09:50 PM

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