Dirty Butter Posted February 23, 2012 Share Posted February 23, 2012 File: [catalogue.class.php] Line: [1050] "SELECT I.*, MATCH (I.product_code,I.description,I.name) AGAINST('plate' IN BOOLEAN MODE) AS Relevance FROM CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `CubeCart_category_index` as CI INNER JOIN CubeCart_category as C where CI.cat_id = C.cat_id AND C.hide = 0) AND I.status = 1 AND (MATCH (I.product_code,I.description,I.name) AGAINST('plate' IN BOOLEAN MODE)) >= 0.500000 AND I.manufacturer IN (') ORDER BY Relevance DESC LIMIT 10 OFFSET 0 " - 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 '') ORDER BY Relevance DESC LIMIT 10 OFFSET 0' at line 1 On v5.0.7 Any ideas about what causes this error - produced with Advanced Search - with or without choosing a Manufacturer - no other sorting choices made? Quote Link to comment Share on other sites More sharing options...
Toucan Web Design Posted February 24, 2012 Share Posted February 24, 2012 It's this bit: I.manufacturer IN (') Should be more something like.. I.manufacturer IN ('20','4','5') So guessing that variable has gotten cut off or overwritten accidentally at some point higher up. Hmm, the relevant section is this: // Manufacturer if (isset($search_data['manufacturer']) && is_array($search_data['manufacturer']) && count($search_data['manufacturer'])>0) { $where[] = 'I.manufacturer IN ('.implode(',', $search_data['manufacturer']).')'; } Which is fine really.. only thing I can think of that would cause that error would be if the manufacturer bit in the search was just sending a ' instead of a number.. and it shouldn't be doing it if the manufacturer isn't set either, bit odd Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted February 24, 2012 Author Share Posted February 24, 2012 I've submitted a support ticket, as I'm on a build needed to fix another problem. They've tried one fix, but it's still not working. I'm going to pass your thoughts on to them - maybe it will be of help. I thought it was odd that nothing but a ' was showing in the error message in that parenthesis - at least I'm reaching a point where I can kind of "read" an error message. :dizzy: Quote Link to comment Share on other sites More sharing options...
convict Posted February 24, 2012 Share Posted February 24, 2012 Problem was different. You are using unpublished release and this code was different there $where[] = 'I.manufacturer IN ('.implode(',', $search_data['manufacturer']).')'; it made mess I already fixed. :closedeyes: Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted February 24, 2012 Author Share Posted February 24, 2012 I don't envy those of you trying to fix one bug without introducing another one!! My hats off to all who actually understand this complex program!!! :yeahhh: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.