Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Aug 2011
    Posts
    64
    Plugin Contributions
    0

    Default Advanced Search Plus Error

    Hi there guys. I have installed this add on and an error appeared:


    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 ' cd.categories_description, cd.categories_id, c.parent_id from zen_categories_d' at line 1
    in:
    [SELECT DISTINCT c.categories_image, cd.categories_name, , cd.categories_description, cd.categories_id, c.parent_id from zen_categories_description cd, zen_categories c where c.categories_status <> 0 AND cd.categories_id = c.categories_id and cd.language_id = '1' AND ((cd.categories_name LIKE '%lifting%' OR cd.categories_description LIKE '%lifting%') and (cd.categories_name LIKE '%magnets%' OR cd.categories_description LIKE '%magnets%') ) order by cd.categories_name]




    where can I find this error to resolve it?
    Any help from you guys is much appreciated.
    Thanks

  2. #2
    Join Date
    Aug 2011
    Posts
    64
    Plugin Contributions
    0

    Default Re: Advanced Search Plus Error

    I am using Advanced Search Plus V1.2 and zencart 1.3.9h


    any help please?

    thanks

  3. #3
    Join Date
    Aug 2011
    Posts
    103
    Plugin Contributions
    0

    Default Re: Advanced Search Plus Error

    i have the same error. if i figure it out, i'll let you know.

  4. #4
    Join Date
    Aug 2011
    Posts
    103
    Plugin Contributions
    0

    Default Re: Advanced Search Plus Error

    Quote Originally Posted by apogeerockets View Post
    i have the same error. if i figure it out, i'll let you know.
    Solution follows (works with zencart 1.3.9, untested in others)

    In advanced_search_categories.php

    replace
    PHP Code:
    $select_column_list '';

    for (
    $col=0$n=sizeof($column_list); $col<$n$col++) {
      if (
    zen_not_null($select_column_list)) {
        
    $select_column_list .= ', ';
      }
      switch (
    $column_list_cat[$col]) {
        case 
    'CATEGORY_LIST_NAME':
        
    $select_column_list .= 'cd.categories_name';
        break;
        case 
    'CATEGORY_LIST_IMAGE':
        
    $select_column_list .= 'c.categories_image';
        break;
      }

    with
    PHP Code:
    $select_column_list '';

    for (
    $col=0$n=sizeof($column_list); $col<$n$col++) {
      if (
    zen_not_null($select_column_list)) {
        
    $select_column_list .= '';
      }
      switch (
    $column_list_cat[$col]) {
        case 
    'CATEGORY_LIST_NAME':
        
    $select_column_list .= 'cd.categories_name, ';
        break;
        case 
    'CATEGORY_LIST_IMAGE':
        
    $select_column_list .= 'c.categories_image, ';
        break;
      }

    for some reason the original code is adding an extra comma, and thus the syntax error.


    other adjustments i made:

    in tpl_modules_advanced_search_categories.php i changed
    PHP Code:
    $lc_text .= '<img src="images/no_picture.gif" width='.IMAGE_PRODUCT_LISTING_WIDTH.' height='.IMAGE_PRODUCT_LISTING_HEIGHT.'/></a>'
    to
    PHP Code:
    $lc_text .= '<img src="images/no_picture.gif" width='.IMAGE_PRODUCT_LISTING_WIDTH.' /></a>'
    because my 'no image' image was getting stretched unproportionally. i also eliminated the IMAGE_PRODUCT_LISTING_HEIGHT from the line below to prevent that from stretching as well. i have all my images to be a uniform width, but don't particularly care if the height varies.

  5. #5
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,133
    Plugin Contributions
    11

    Default Re: Advanced Search Plus Error

    Quote Originally Posted by newbie456 View Post
    [SELECT DISTINCT c.categories_image, cd.categories_name, , cd.categories_description,
    The code (by using , , ) is asking MySql to be psychic and know what it's looking for without being told. If the , , is generated by variables, the variable may have been incorrectly blanked. If not generated by variables, change , , to , and it should work.

  6. #6
    Join Date
    Aug 2011
    Posts
    103
    Plugin Contributions
    0

    Default Re: Advanced Search Plus Error

    but now i can't get it to pop up ezpage results. *sigh*

  7. #7
    Join Date
    Aug 2011
    Posts
    103
    Plugin Contributions
    0

    Default Re: Advanced Search Plus Error

    Quote Originally Posted by apogeerockets View Post
    but now i can't get it to pop up ezpage results. *sigh*
    figured this out too, thankfully.

    in advanced_search_ezpages.php, comment out (or delete)
    PHP Code:
    if ((EZPAGES_STATUS_HEADER == '1')  or (EZPAGES_STATUS_FOOTER == '1') or (EZPAGES_STATUS_SIDEBOX == '1')) { 
    and its respective ending bracket (the last bracket on the page)

  8. #8
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,133
    Plugin Contributions
    11

    Default Re: Advanced Search Plus Error

    Looks like this mod has had problems with EZpages from the start.
    And.... I'm not sure I would trust it with the newer versions without a lot of checking.
    The mod still lists 1.3.8 even though it was upgraded after 1.3.9.
    Be careful that you aren't breaking something else.

  9. #9
    Join Date
    Aug 2011
    Posts
    103
    Plugin Contributions
    0

    Default Re: Advanced Search Plus Error

    Quote Originally Posted by dbltoe View Post
    Looks like this mod has had problems with EZpages from the start.
    And.... I'm not sure I would trust it with the newer versions without a lot of checking.
    The mod still lists 1.3.8 even though it was upgraded after 1.3.9.
    Be careful that you aren't breaking something else.
    yeah, that last work-around seems to have fixed it from what i can tell. our site isn't live yet, but i'll make sure i run more tests to make sure it didn't break it in a different way.

  10. #10
    Join Date
    Aug 2007
    Location
    Cannon Beach, OR
    Posts
    180
    Plugin Contributions
    0

    Default Re: Advanced Search Plus Error

    Just a note on this: I installed this mod on 2 sites, and 1 of them threw the 1064 error as posted above by newbie456, and the other did not. I made the fix posted above by apogeerockets on the one that didn't work, and that fixed it. I left the one that was working alone.

    I haven't delved into the SQL statement to see why one site worked, and the other didn't. But it helps to explain why the original code worked for the developer, but others occasionally had trouble with it.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Advanced Search Plus
    By twitchtoo in forum All Other Contributions/Addons
    Replies: 32
    Last Post: 30 Aug 2023, 03:40 PM
  2. Advanced Search Plus - Infinite Redirect
    By hey_you in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 27 Jul 2010, 02:57 PM
  3. Need help on Advanced Search Plus
    By neal99 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 25 Feb 2010, 03:25 PM
  4. A fix to Advanced Search Plus results?
    By FrankDeRosa in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 28 Dec 2009, 11:04 AM
  5. Advanced Search Plus
    By rmkiser in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 15 May 2009, 04:05 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