Make searches use words as keywords
This commit is contained in:
@@ -466,14 +466,16 @@ function searchForApplication($search_words)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$search_words = str_replace(' ', '%', mysql_real_escape_string($search_words));
|
||||||
|
|
||||||
/* base query */
|
/* base query */
|
||||||
$sQuery = "SELECT *
|
$sQuery = "SELECT *
|
||||||
FROM appFamily, vendor
|
FROM appFamily, vendor
|
||||||
WHERE appName != 'NONAME'
|
WHERE appName != 'NONAME'
|
||||||
AND appFamily.vendorId = vendor.vendorId
|
AND appFamily.vendorId = vendor.vendorId
|
||||||
AND appFamily.queued = 'false'
|
AND appFamily.queued = 'false'
|
||||||
AND (appName LIKE '%".mysql_real_escape_string($search_words)."%'
|
AND (appName LIKE '%" . $search_words . "%'
|
||||||
OR keywords LIKE '%".mysql_real_escape_string($search_words)."%'";
|
OR keywords LIKE '%" . $search_words . "%'";
|
||||||
|
|
||||||
/* append to the query any vendors that we matched with */
|
/* append to the query any vendors that we matched with */
|
||||||
foreach($vendorIdArray as $key=>$value)
|
foreach($vendorIdArray as $key=>$value)
|
||||||
|
|||||||
Reference in New Issue
Block a user