![]() |
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? |
Re: Quick Syntax help request please
Quote:
Code:
$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 $sql_tbl[categories].category LIKE '%$kit%' $membership_condition ":"")." group by $sql_tbl[categories].categoryid order by ".($current_area=="C" ? "order_by" : "category")); |
All times are GMT -8. The time now is 09:34 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.