I'm using PHP5 & MySQL5 and according to the MySQL docs, the LIKE comparator is case-sensitive on strings. Seeing as the zen_parse_search_string function drops everything to lowercase, the advanced_search_result/header_php.php should have LOWER() modifiers put in around lines 282-326:
Code:
if (isset($keywords) && zen_not_null($keywords)) {
if (zen_parse_search_string(stripslashes($_GET['keyword']), $search_keywords)) {
$where_str .= " AND (";
for ($i=0, $n=sizeof($search_keywords); $i<$n; $i++ ) {
switch ($search_keywords[$i]) {
case '(':
case ')':
case 'and':
case 'or':
$where_str .= " " . $search_keywords[$i] . " ";
break;
default:
$where_str .= "(LOWER(pd.products_name) LIKE '%:keywords%'
OR LOWER(p.products_model)
LIKE '%:keywords%'
OR LOWER(m.manufacturers_name)
LIKE '%:keywords%'";
$where_str = $db->bindVars($where_str, ':keywords', $search_keywords[$i], 'noquotestring');
// search meta tags
$where_str .= " OR (LOWER(mtpd.metatags_keywords)
LIKE '%:keywords%'
AND mtpd.metatags_keywords !='')";
$where_str = $db->bindVars($where_str, ':keywords', $search_keywords[$i], 'noquotestring');
$where_str .= " OR (LOWER(mtpd.metatags_description)
LIKE '%:keywords%'
AND mtpd.metatags_description !='')";
$where_str = $db->bindVars($where_str, ':keywords', $search_keywords[$i], 'noquotestring');
if (isset($_GET['search_in_description']) && ($_GET['search_in_description'] == '1')) {
$where_str .= " OR LOWER(pd.products_description)
LIKE '%:keywords%'";
$where_str = $db->bindVars($where_str, ':keywords', $search_keywords[$i], 'noquotestring');
}
$where_str .= ')';
break;
}
}
$where_str .= " )";
}
}
HTH, Thanks.
Bookmarks