case sensitive search with MATCH AGAINST along with ID
Here is my sql:
PHP Code:
$filterstr = sqlstr($filter);
if (!$wholeonly && isset($wholeonly) && $filterstr!='') $filterstr = "%" .$filterstr ."%";
$sql = "SELECT COUNT(*) FROM `description`";
if (isset($filterstr) && $filterstr!='' && isset($filterfield) && $filterfield!='') {
$sql .= " where " .sqlstr($filterfield) ." like '" .$filterstr ."'";
} elseif (isset($filterstr) && $filterstr!='') {
$sql .= " where MATCH (ID , SERIES_NUM ,TITLE,DESCRIPTION,CATEGORY,`TYPE`,VERSION,MEDIA_TYPE,PLATFORM,DATE,FILENAME) AGAINST ('+$filterstr -$filterstr' IN BOOLEAN MODE); ";
}
$res = mysql_query($sql, $conn) or die(mysql_error());
$row = mysql_fetch_assoc($res);
reset($row);
return current($row);
If i REMOVE ID from the MATCH...case sensitivity goes away. if i put it back in, case sensitivity comes back...how can i get around this? I need to search the ID as well without case sensitivity.
Im using MySQL 5.1.36