| [SOLVED] Â How to implement FULL TEXT SEARCH? | 12/9/2008 14:39:58 | |
| PHPRunner General questions | ||
| LLorenbond author 4.2 (build 379) MySQL database | ||
| J | Jane 12/11/2008 | 
| Hi, | |
| L | Lorenbond author 12/17/2008 | 
| Jane, I replaced the code in main_list with :$strWhere = "MATCH ( Details, Title , PartNumber ) AGAINST ('".$strSearchFor."')"; | |
| J | Jane 12/17/2008 | 
| Hi, $arr = explode(",",$strSearchFor); $strWhere = ""; for ($i=0; $i<count($arr); $i++) $strWhere.= "UPPER(FieldName)=UPPER('".trim($arr[$i])."') or "; $strWhere = substr($strWhere,0,-3); | |
| L | Lorenbond author 12/17/2008 | 
| Ok, This is what works for me: | |
| L | Lorenbond author 12/18/2008 | 
| Using 4.2(build 379) foreach Fields as @f filter @f.bSearch## if($where=StrWhere("##@f.strName s##", $strSearchFor, $strSearchOption, ""))
 foreach Fields as @f filter @f.bSearch## if($where=StrWhere("##@f.strName s##", $strSearchFor, $strSearchOption, "")) | |
| L | Lorenbond author 12/19/2008 | 
| I noticed that when I used a natural Msql FULL TEXT search the results would be returned in by rank. To make this meaningful I would have to alter the sort order of the query. No big problem but still I would get a lot of returns I didn't want. | |
| L | Lorenbond author 1/16/2009 | 
| Using version 4.2 (build 379) | |
| L | laonian 2/19/2009 | 
| Hi, The Parts Hanger, | |