That was a different sql error. Try this line instead. Again this is untested. I may have a few minutes at the end of the week to test this. Right now I'm swamped.
Code:
$search_query = "AND $sql_tbl[products].forsale='Y' and $sql_tbl[products].avail>0 and $sql_tbl[products].sales_stats > $threshold AND $sql_tbl[categories].avail='Y' and price>0;
Thanks!
Carrie