View Single Post
  #4  
Old 10-23-2002, 08:26 AM
 
ryan ryan is offline
 

Advanced Member
  
Join Date: Sep 2002
Location: Philly
Posts: 38
 

Default

Well I figured out my problem and of course it was just one of those dumb mistakes. If you notice in my code above i have "products.fulldesc" but it should be "products.fulldescr". That's what you get when you change two things at once. So if anyone is interested here is how I modified the search box code (atleast the query in search.php) "selGenre" is the name of my drop down box.
Code:
if ($selGenre == 'all'){ $search_query = "(products.product like '%$substring%' or products.descr like '%$substring%' or products.productcode like '%$substring%' or products.param05 like '%$substring%' or products.fulldescr like '%$substring%') and categories.category like '$search_category%' and products.forsale='Y' group by products.product"; #echo $selGenre; } else { $search_query = "(products.product like '%$substring%' or products.descr like '%$substring%' or products.productcode like '%$substring%' or products.param05 like '%$substring%') and products.param04 like '$selGenre%' and categories.category like '$search_category%' and products.forsale='Y' group by products.product"; }

In order for the pages beyond the first page of results you also need to change this code on search.php:
Code:
$smarty->assign("navigation_script","search.php?substring=".urlencode($substring)."&in_category=$in_category&selGenre=$selGenre");
Reply With Quote