View Single Post
  #1  
Old 10-20-2003, 09:25 PM
 
Scurvy Scurvy is offline
 

Member
  
Join Date: Apr 2003
Posts: 15
 

Default Quick Syntax help request please

Take a look at this code from the categories.php file.

$categories_data = func_query("select $sql_tbl[categories].*, 0 as product_count from $sql_tbl[categories] ".($current_area=="C"?"where $sql_tbl[categories].avail='Y' AND '$kit' like $sql_tbl[categories].category $membership_condition ":"")." group by $sql_tbl[categories].categoryid order by ".($current_area=="C" ? "order_by" : "category"));

The only thing I added is: AND '$kit' like $sql_tbl[categories].category

It works just fine as it is, but what I really need is to have the % wildcard before and after the $sql_tbl[categories].category so I can have fuzzy matches. I've tried everything I can think of to get them in there using tics, quotes, parentheses, slashes, etc but I always get a syntax error. Can anyone lend a hand here?
Reply With Quote