thanks
on the results page am not sure how to structure the filter and have tried a variety with no luck:
 
$SubCategory->setQuery("SELECT * FROM gallery_category_contents WHERE ProductContentsID = ? AND CategoryID <> 0");
$SubCategory->bindParam("i", "".(isset($_GET['CategoryID'])?$_GET['CategoryID']:"")  ."", "-1"); //colname
 and
 
$SubCategory->setQuery("SELECT * FROM gallery_category_contents WHERE CategoryID = ? AND CategoryID <> 0");
$SubCategory->bindParam("i", "".(isset($_GET['ProductContentsID'])?$_GET['ProductContentsID']:"")  ."", "-1"); //colname 
and also
$SubCategory->setQuery("SELECT * FROM gallery_category_contents WHERE CategoryID = ProductContentsID");

