View Single Post
  #1 (permalink)  
Old 10-27-09, 11:17 AM
tooletime tooletime is offline
New Member
 
Join Date: Oct 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
case sensitive search with MATCH AGAINST along with ID

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

Last edited by Nico; 11-07-09 at 04:26 AM.
Reply With Quote