View Single Post
  #1  
Old 09-19-2003, 09:57 PM
 
wallachee wallachee is offline
 

Senior Member
  
Join Date: Feb 2003
Posts: 102
 

Default Improved Search Function

I need some help with my xcart search. Whenever a customer enters a phrase that is more than two words, the search rarely picks up the products unless an exact match is found. What I need is for it to pick up one of the words in the phrase or both words but not together. How can I do this. My current search.php search looks like this

Code:
$search_query = "($sql_tbl[products].product like '%$substring%' or $sql_tbl[products].descr like '%$substring%') and $sql_tbl[categories].category like '$search_category%' and $sql_tbl[products].forsale='Y' and $sql_tbl[categories].avail='Y' $price_condition ";

Any help is appreciated.

-Bradley
Reply With Quote