I gotta be honest, that is way over my head
Here's some more info:
Turns out I was looking in completely in the wrong place. I now believe the search aspect of the code is in head.inc.php
I found this code.
// ---------- search
case "search":
if ($_GET['ps'] == NULL) { header("Location: ".$installDir['value']); }
// get keywords
$pieces = explode(" ", strip_tags($_GET['ps']));
$kp = count($pieces);
// reset pieces
$pluspieces = '';
for ($pi=0;$pi<$kp;$pi++) {
$pluspieces .= $pieces[$pi].' ';
}
$pluspieces = rtrim($pluspieces, " ");
// output search results
$extracondition = '';
if (isset($_GET['pscat'])){
$extracondition .= " AND prodCategory = ".quote_smart($_GET['pscat'])."";
}
if (isset($_GET['pslow'])){
$extracondition .= " AND (prodPrice BETWEEN ".quote_smart($_GET['pslow'])." AND ".quote_smart($_GET['pshigh']).")";
}
if ($indcount == 0) {
$query_product = "SELECT *, ( (1.3 * (MATCH(prodName) AGAINST (".quote_smart($pluspieces)." IN BOOLEAN MODE))) + (0.6 * (MATCH(prodDescription,merchant,prodCategory,prodBrand) AGAINST (".quote_smart($pluspieces)." IN BOOLEAN MODE))) ) AS relevance FROM affiliSt_products1 WHERE ( MATCH(prodName,prodDescription,merchant,prodCategory,prodBrand) AGAINST (".quote_smart($pluspieces)." IN BOOLEAN MODE) ) $extracondition HAVING relevance > 0 $sortby";
} else {
$query_product = "SELECT *, MATCH (prodName,prodDescription,prodBrand,prodCategory) AGAINST (".quote_smart($pluspieces).") AS relevance FROM affiliSt_products1 WHERE MATCH (prodName,prodDescription,prodBrand,prodCategory) AGAINST (".quote_smart($pluspieces).") $extracondition HAVING relevance > 0 $sortby";
}
break;
Ive tried changing this to:
if ($indcount == 0) {
$query_product = "SELECT *, ( (1.3 * (MATCH(prodName) AGAINST (".quote_smart($pluspieces)." IN BOOLEAN MODE))) + (0.6 * (MATCH(merchant,prodCategory,prodBrand) AGAINST (".quote_smart($pluspieces)." IN BOOLEAN MODE))) ) AS relevance FROM affiliSt_products1 WHERE ( MATCH(prodName,merchant,prodCategory,prodBrand) AGAINST (".quote_smart($pluspieces)." IN BOOLEAN MODE) ) $extracondition HAVING relevance > 0 $sortby";
} else {
$query_product = "SELECT *, MATCH (prodName,prodBrand,prodCategory) AGAINST (".quote_smart($pluspieces).") AS relevance FROM affiliSt_products1 WHERE MATCH (prodName,prodBrand,prodCategory) AGAINST (".quote_smart($pluspieces).") $extracondition HAVING relevance > 0 $sortby";
}
break;
I got an error saying
Can't find FULLTEXT index matching the column list
I went into phpmyadmin and clicked the little icon with the T, when I hovered over it said Fulltext. Did this for merchant, prodBrand, prodCategory and prodName but still getting that error.