Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2009
    Posts
    3
    Plugin Contributions
    0

    Default Advance Search Results SQL syntax error after 1.3.9b upgrade

    Hello Everyone,

    I have upgraded http://www.fsbooks.com/shop/ to 1.3.9b with (I thought) no problems.

    But I just discovered that my advanced search results are generating the following error:

    "1064 You have an error in your SQL syntax; ...."

    The syntax error seems to be that the "order by" clause is duplicated at the end of the SQL request.

    I dug through includes>modules>pages>advanced_search_result>header_php.php over and over, but couldn't figure out why it was generating the error.

    THEN I noticed that the breadcrumbs are ALSO duplicated. It appears that for some reason this particular header_php.php file is being called twice. The problem doesn't occur on any other pages that I can find.

    Can anyone give me some ideas how this might happen, and where I might look for a fix?

    Here's a link for a search showing the problem:
    http://www.fsbooks.com/shop/index.ph...=&pto=&x=0&y=0

    Any suggestions very gratefully appreciated.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Advance Search Results SQL syntax error after 1.3.9b upgrade

    How many header_php files are in that folder?
    Remember: ALL "backup" files should NEVER use the original ".php" or ".css" or ".js" extension. If you're going to make backups by renaming a file, ALWAYS use a different file extension, like ".bak"
    .

    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
    Join Date
    Jul 2009
    Posts
    3
    Plugin Contributions
    0

    Default Re: Advance Search Results SQL syntax error after 1.3.9b upgrade

    I had no idea!

    When I have edited the SQL calls in the header_php files, I've just added "-OLD" before the suffix to keep a copy of the original file.

    I'm not too optimistic, though, because I have half a dozen others similarly edited and backed up without causing the issue.

    I will change all the suffixes and report back.

    THANKS for the tip!

  4. #4
    Join Date
    Jul 2009
    Posts
    3
    Plugin Contributions
    0

    Default Re: Advance Search Results SQL syntax error after 1.3.9b upgrade

    I wasn't optimistic, but I was completely wrong because the issue was fixed by removing the backup file with its .php extension.

    Now re-renaming all of my backup files.

    Best practice, here I come!

    DrByte, you are my favorite person today. THANK YOU!

 

 

Similar Threads

  1. Working on upgrade - SQL syntax error
    By Three Sisters in forum Upgrading to 1.5.x
    Replies: 17
    Last Post: 18 Jun 2014, 10:09 AM
  2. Replies: 1
    Last Post: 25 Aug 2011, 05:58 AM
  3. Replies: 10
    Last Post: 4 Oct 2010, 11:08 PM
  4. Adding Filter By and Sort By to Advance Search Results
    By kwright in forum General Questions
    Replies: 0
    Last Post: 30 Oct 2008, 10:20 PM
  5. Replies: 3
    Last Post: 21 Sep 2008, 12:45 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