Thread: Search Error

Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2006
    Posts
    12
    Plugin Contributions
    0

    Default Search Error

    Ok, its probably not a bug, probably something i did, probably something silly, but...

    When I do a search on a site scheduled for deployment, I get an error as follows:

    Error:

    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 'SELECT DISTINCT
    in:
    [select count(distinct p.products_id) as total FROM shp_products p LEFT JOIN shp_manufacturers m USING ( manufacturers_id ) , shp_products_description pd WHERE p.products_status = 1 AND p.products_id = pd.products_id AND ( p.products_id IN ( SELECT DISTINCT p.products_id FROM shp_products p LEFT JOIN shp_manufacturers m USING(manufacturers_id), shp_products_description pd, shp_categories c, shp_products_to_categories p2c LEFT JOIN shp_meta_tags_products_description mtpd ON mtpd.products_id= p2c.products_id AND mtpd.language_id = 1 WHERE (p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 AND p.products_id = p2c.products_id AND p2c.categories_id = c.categories_id AND ((pd.products_name LIKE '%stuff%' OR p.products_model LIKE '%stuff%' OR m.manufacturers_name LIKE '%stuff%' OR (mtpd.metatags_keywords LIKE '%stuff%' AND mtpd.metatags_keywords !='') OR (mtpd.metatags_description LIKE '%stuff%' AND mtpd.metatags_description !='') OR pd.products_description LIKE '%stuff%') )) ) OR p.products_id IN ( SELECT DISTINCT p.products_id FROM shp_products p LEFT JOIN shp_manufacturers m USING ( manufacturers_id ), shp_products_description pd, shp_categories c, shp_products_to_categories p2c LEFT JOIN shp_meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id AND mtpd.language_id = 1, shp_product_book_extra pbe, shp_books_to_authors bta, shp_book_authors ba, shp_book_authors_info bai WHERE p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 AND p.products_id = p2c.products_id AND p2c.categories_id = c.categories_id AND pbe.products_id = p.products_id AND bta.products_id = p.products_id AND bta.book_authors_id = ba.book_authors_id AND ba.book_authors_id = bai.book_authors_id AND bai.language_id = 1 AND ((pd.products_name LIKE '%stuff%' OR p.products_model LIKE '%stuff%' OR m.manufacturers_name LIKE '%stuff%' OR pd.products_description LIKE '%stuff%'OR book_authors_name LIKE '%stuff%'OR book_authors_nickname LIKE '%stuff%'OR subtitle LIKE '%stuff%') ) ) OR p.products_id IN ( SELECT DISTINCT p.products_id FROM shp_products p LEFT JOIN shp_manufacturers m USING ( manufacturers_id ), shp_products_description pd, shp_categories c, shp_products_to_categories p2c LEFT JOIN shp_meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id AND mtpd.language_id = 1, shp_books_to_genres btg, shp_book_genre bg, shp_book_genre_description bgd WHERE p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 AND p.products_id = p2c.products_id AND p2c.categories_id = c.categories_id AND btg.products_id = p.products_id AND btg.book_genre_id = bg.book_genre_id AND bg.book_genre_id = bgd.book_genre_id AND bgd.language_id = 1 AND ((pd.products_name LIKE '%stuff%' OR p.products_model LIKE '%stuff%' OR m.manufacturers_name LIKE '%stuff%' OR pd.products_description LIKE '%stuff%' OR book_genre_name LIKE '%stuff%') ) ) OR p.products_id IN ( SELECT DISTINCT p.products_id FROM shp_products p LEFT JOIN shp_manufacturers m USING ( manufacturers_id ), shp_products_description pd, shp_categories c, shp_products_to_categories p2c LEFT JOIN shp_meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id AND mtpd.language_id = 1, shp_books_to_types btt, shp_book_type bt, shp_book_type_description btd WHERE p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 AND p.products_id = p2c.products_id AND p2c.categories_id = c.categories_id AND btt.products_id = p.products_id AND btt.book_type_id = bt.book_type_id AND bt.book_type_id = btd.book_type_id AND btd.language_id = 1 AND ((pd.products_name LIKE '%stuff%' OR p.products_model LIKE '%stuff%' OR m.manufacturers_name LIKE '%stuff%' OR pd.products_description LIKE '%stuff%' OR book_type_name LIKE '%stuff%') ) ) ) ]
    Fresh Install of 1.3.5 with recent XSS patch applied.
    MySQL 4, PHP 4.4.1

    All changes are to template overrides.

    Mods applied:
    Admin Profiles
    Better together
    Column layout grid
    cross sell
    language currency links in header
    Book product type
    sales report
    swap images via mouseover
    Separate login and register
    Wishlist

    Others due to be installed:
    linkpoint
    Super Orders


    Installed languages:
    Spanish
    German
    French
    (all turned off at this point while being edited)


    Sidebox columns are turned off.
    Search sidebox and search header are turned on.


    This affects any search done in the store.

    I have absolutely no clue on this one.

  2. #2
    Join Date
    Aug 2004
    Location
    Saint Petersburg, Russia
    Posts
    1,786
    Plugin Contributions
    13

    Default Re: Search Error


 

 

Similar Threads

  1. Replies: 4
    Last Post: 19 Mar 2016, 04:54 AM
  2. Replies: 10
    Last Post: 4 Oct 2010, 11:08 PM
  3. Search error
    By chufty bill in forum General Questions
    Replies: 2
    Last Post: 28 Sep 2006, 02:42 PM
  4. Search error in search box
    By sparktronic in forum General Questions
    Replies: 7
    Last Post: 17 Aug 2006, 05:53 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