Jump to content

Advanced Search Error Message

Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...