Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2011
    Posts
    9
    Plugin Contributions
    0

    Default 1064 SQL error on Featured Products page

    Everything in my store (not active yet) is working fine. Some time ago when I added the Product Columns add-on a noticed an error I was getting when I clicked "more" in the Featured Product Sidebox.

    The error is as follows:

    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 'limit 3' at line 1
    in:
    [ limit 3]


    The limit number changes based on my settings in the admin under max values. I messed with that because some similar threads suggested it might be a limit="0" issue. I still get the error after changing the value to any number.

    Most 1064 SQL errors give you the place where the error is occuring after the "at line 1 in:" but my error is blank after that so I have no idea what file it is happening in.

    I have temp dealt with this by removing any reference links to the main Featured Product Index page, but that is not a great solution.

    Any help would be greatly appreciated as I fear I am corrupting my SQL databse by letting the error continue.

    You can see the error here: http://www.creativechocolatedesign.c...tured_products

    I am running v1.3.9h

    Thanks ahead of time.

  2. #2
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,246
    Plugin Contributions
    58

    Default Re: 1064 SQL error on Featured Products page

    Have you ran check and repair on the database?

    ~Melanie
    PRO-Webs, Inc. since 2003 :: Zen Cart Hosting :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are not conducive to a helpful community.

  3. #3
    Join Date
    Feb 2011
    Posts
    9
    Plugin Contributions
    0

    Default Re: 1064 SQL error on Featured Products page

    Thanks for that.

    I am not well versed in database admin. Ran it and found the following:

    Problems with indexes of table `zen_so_payment_types`
    The following indexes appear to be equal and one of them should be removed: type_code, type_code_2

    Problems with indexes of table `zen_so_refunds`
    The following indexes appear to be equal and one of them should be removed: PRIMARY, refund_id

    From a layman's perspective I think those are small errors that were created when I added the Super Orders Module. Could that cause the Featured Products page to get an error? I am afraid to remove either index as I am not sure which is the correct one.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: 1064 SQL error on Featured Products page

    Quote Originally Posted by rconway28 View Post
    Thanks for that.

    I am not well versed in database admin. Ran it and found the following:

    Problems with indexes of table `zen_so_payment_types`
    The following indexes appear to be equal and one of them should be removed: type_code, type_code_2

    Problems with indexes of table `zen_so_refunds`
    The following indexes appear to be equal and one of them should be removed: PRIMARY, refund_id

    From a layman's perspective I think those are small errors that were created when I added the Super Orders Module. Could that cause the Featured Products page to get an error? I am afraid to remove either index as I am not sure which is the correct one.
    Those are trivial, and are extremely minor issues related only to performance/speed tuning. And, given that your use of those tables is highly unlikely to climb into the hundreds of thousands of records, you can safely ignore those suggestions, as they will not impede performance of your site to any noticeable degree.
    They're completely unrelated to the symptoms you reported in your first post.

    As for dealing with the issue in your first post, on the surface it appears as though you've got a script on your site that's generating invalid SQL statements to send to the database. You'll need to find the offending piece of code and fix it.
    I can't give you a magical answer to fix it. You'll need to find out what's altered from original core code and study whether it's been altered in a way that is actually correct, or whether it needs fixing or whether addon code needs to be re-installed correctly or needs to be deleted because the addon code is bad.

    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
    Join Date
    Feb 2011
    Posts
    9
    Plugin Contributions
    0

    Default Re: 1064 SQL error on Featured Products page

    Thanks Dr Byte.

    Sadly it is what I assumed. This is my first Zen Cart site and in hind site I would have kept much better track of all of the add-ons that I have loaded. Tie that in to all the custom code I have added and/or tweaked for design features and I am not sure I could ever find it.

    Although I am pretty sure it happened after I added the Column for New Products and Features Products Add ON. Maybe I will investigate a little.

    For now I am fine hiding the Featured Products index page since everything else is running smoothly. In your expertise opinion, is that errant code causing any permanent issues that will eventually bite me in the ########?

    Thank you and the others for your input. This was the only issue (of many along the way) that I could not find an answer to just by searching the forum and the only one I posted about. Well, I posted something Sunday about the UPS server outage (hacking related), but even that wasn't a ZC issue and someone still enlightened me to what it was!!

    Great community.

 

 

Similar Threads

  1. Replies: 6
    Last Post: 1 Oct 2011, 03:16 PM
  2. Replies: 1
    Last Post: 25 Aug 2011, 05:58 AM
  3. 1064 SQL error on Featured Products page
    By stevelucky in forum General Questions
    Replies: 5
    Last Post: 24 Sep 2010, 01:15 PM
  4. Replies: 2
    Last Post: 16 Sep 2009, 06:15 PM
  5. SQL Error 1064??
    By sethererm in forum General Questions
    Replies: 15
    Last Post: 25 Jul 2008, 04:40 PM

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