Thread: Search Upgrade
View Single Post
  #6  
Old 07-24-2003, 08:04 AM
 
machnhed1 machnhed1 is offline
 

eXpert
  
Join Date: Feb 2003
Location: Illinois
Posts: 274
 

Default

Heck yeah, it worked really well. I simply updated my SQL statement from:

Code:
$categories_data2[$key][] = func_query("select * from $sql_tbl[categories] where category LIKE '".$value[category]."/%' and category NOT LIKE '".$value[category]."/%/%' and avail='Y' group by $sql_tbl[categories].categoryid order by order_by");

To:
Code:
$categories_data2[$key][] = func_query("select $sql_tbl[categories].*, SUBSTRING_INDEX($sql_tbl[categories].category, '\/', -1) as category_name from $sql_tbl[categories] where category LIKE '".$value[category]."/%' and category NOT LIKE '".$value[category]."/%/%' and avail='Y' group by $sql_tbl[categories].categoryid order by order_by");

Thanks a ton, I would have never of guessed to updated my SQL statement, I was stuck on a PHP solution.
__________________
Following the signature guidelines : xcart pro 3.5.8 - [RedHat]
Reply With Quote