Jump to content

Upgrade from 4.3.9 to 4.4.0 breaks Search function


Recommended Posts

After upgrading from 439 to 440 the search function from the store's home page returns the following error:

MySQL Error Occurred

Error Message:

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 '*) as `count`, MATCH (I.description,I.name,I.productCode) AGAINST('+(count(*) as' at line 1

SQL:

SELECT DISTINCT(I.productId), I.count(*) as `count`, MATCH (I.description,I.name,I.productCode) AGAINST('+(count(*) as `count`2006count(*) as `count`)' IN BOOLEAN MODE) AS SearchScore FROM apollo_CubeCart_inventory AS I, apollo_CubeCart_category AS C WHERE (MATCH (I.description,I.name,I.productCode) AGAINST('+(count(*) as `count`2006count(*) as `count`)' IN BOOLEAN MODE)) >= 0.500000 AND C.cat_id > 0 AND C.cat_id = I.cat_id AND C.hide = '0' AND (C.cat_desc != '##HIDDEN##' OR C.cat_desc IS NULL) AND I.disabled = '0' ORDER BY SearchScore DESC

Anyone else having this problem or knows a cure?

Thanks,

Paul

Link to comment
Share on other sites

Guest thecanfool

I am also getting an error when trying to use the search function

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 '*) as `count`, I.name AS SearchScore FROM CubeCart_inventory AS I, CubeCart_cate' at line 1

the above error is a search fir null

below is a search for a string

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 '*) as `count`, MATCH (I.description,I.name,I.productCode) AGAINST('+(count(*) as' at line 1

Link to comment
Share on other sites

Break search and got this error

Deprecated: Function split() is deprecated in /home/xxxx/includes/content/viewCat.inc.php on line 185

MySQL Error Occurred

Error Message:

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 '*) as `count`, I.name AS SearchScore FROM CubeCart_inventory AS I, CubeCart_cate' at line 1

SQL:

SELECT DISTINCT(I.productId), I.count(*) as `count`, I.name AS SearchScore FROM CubeCart_inventory AS I, CubeCart_category AS C WHERE (I.name RLIKE '[[:<:]]chang[[:>:]].count(*) as `count`[[:<:]]trai[[:>:]].count(*) as `count`[[:<:]]da[[:>:]].count(*) as `count`[[:<:]]tai[[:>:]]' OR I.description RLIKE '[[:<:]]chang[[:>:]].count(*) as `count`[[:<:]]trai[[:>:]].count(*) as `count`[[:<:]]da[[:>:]].count(*) as `count`[[:<:]]tai[[:>:]]' OR I.productCode RLIKE '[[:<:]]chang[[:>:]].count(*) as `count`[[:<:]]trai[[:>:]].count(*) as `count`[[:<:]]da[[:>:]].count(*) as `count`[[:<:]]tai[[:>:]]') AND C.cat_id > 0 AND C.cat_id = I.cat_id AND C.hide = '0' AND (C.cat_desc != '##HIDDEN##' OR C.cat_desc IS NULL) AND I.disabled = '0' ORDER BY `date_added` DESC, `name` ASC

Link to comment
Share on other sites

Guest Technocrat

Break search and got this error

Deprecated: Function split() is deprecated in /home/xxxx/includes/content/viewCat.inc.php on line 185

MySQL Error Occurred

Error Message:

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 '*) as `count`, I.name AS SearchScore FROM CubeCart_inventory AS I, CubeCart_cate' at line 1

SQL:

SELECT DISTINCT(I.productId), I.count(*) as `count`, I.name AS SearchScore FROM CubeCart_inventory AS I, CubeCart_category AS C WHERE (I.name RLIKE '[[:<:]]chang[[:>:]].count(*) as `count`[[:<:]]trai[[:>:]].count(*) as `count`[[:<:]]da[[:>:]].count(*) as `count`[[:<:]]tai[[:>:]]' OR I.description RLIKE '[[:<:]]chang[[:>:]].count(*) as `count`[[:<:]]trai[[:>:]].count(*) as `count`[[:<:]]da[[:>:]].count(*) as `count`[[:<:]]tai[[:>:]]' OR I.productCode RLIKE '[[:<:]]chang[[:>:]].count(*) as `count`[[:<:]]trai[[:>:]].count(*) as `count`[[:<:]]da[[:>:]].count(*) as `count`[[:<:]]tai[[:>:]]') AND C.cat_id > 0 AND C.cat_id = I.cat_id AND C.hide = '0' AND (C.cat_desc != '##HIDDEN##' OR C.cat_desc IS NULL) AND I.disabled = '0' ORDER BY `date_added` DESC, `name` ASC

Open that file

Find:

$searchwords = split ( '[ ,]', sanitizeVar($_REQUEST['searchStr']));

Replace with:

$searchwords = preg_split( '/[ ,]/', sanitizeVar($_REQUEST['searchStr']));

Link to comment
Share on other sites

Break search and got this error

Deprecated: Function split() is deprecated in /home/xxxx/includes/content/viewCat.inc.php on line 185

MySQL Error Occurred

Error Message:

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 '*) as `count`, I.name AS SearchScore FROM CubeCart_inventory AS I, CubeCart_cate' at line 1

SQL:

SELECT DISTINCT(I.productId), I.count(*) as `count`, I.name AS SearchScore FROM CubeCart_inventory AS I, CubeCart_category AS C WHERE (I.name RLIKE '[[:<:]]chang[[:>:]].count(*) as `count`[[:<:]]trai[[:>:]].count(*) as `count`[[:<:]]da[[:>:]].count(*) as `count`[[:<:]]tai[[:>:]]' OR I.description RLIKE '[[:<:]]chang[[:>:]].count(*) as `count`[[:<:]]trai[[:>:]].count(*) as `count`[[:<:]]da[[:>:]].count(*) as `count`[[:<:]]tai[[:>:]]' OR I.productCode RLIKE '[[:<:]]chang[[:>:]].count(*) as `count`[[:<:]]trai[[:>:]].count(*) as `count`[[:<:]]da[[:>:]].count(*) as `count`[[:<:]]tai[[:>:]]') AND C.cat_id > 0 AND C.cat_id = I.cat_id AND C.hide = '0' AND (C.cat_desc != '##HIDDEN##' OR C.cat_desc IS NULL) AND I.disabled = '0' ORDER BY `date_added` DESC, `name` ASC

Open that file

Find:

$searchwords = split ( '[ ,]', sanitizeVar($_REQUEST['searchStr']));

Replace with:

$searchwords = preg_split( '/[ ,]/', sanitizeVar($_REQUEST['searchStr']));

Many thanks for your great help Technocrat. It is working great.

Link to comment
Share on other sites

Guest Technocrat

I fixed them all already except for PayJunction. I don't want to mess with that one so someone else will have to look at it

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.

Guest
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.

 Share

×
×
  • Create New...