What is wrong with this?
$result = mysql_query("SELECT * FROM products WHERE ProductID=".$filter." AND CategoryID=".$CategoryID);
$result = mysql_query("SELECT * FROM products WHERE ProductID=$filter AND CategoryID=$CategoryID");
or
$result = mysql_query("SELECT * FROM products WHERE ProductID=".$filter." AND CategoryID=".$CategoryID.")";
If I'm not mistaken this one is wrong. The end has a mistake. Could you echo the query?
$result = mysql_query("SELECT * FROM products WHERE ProductID='".$filter."' AND CategoryID='".$CategoryID."'");
Should do the trick.
Oops, you're right. My bad.
well i think even this should work
$result = mysql_query("SELECT * FROM products WHERE ProductID='$filter' AND CategoryID='$CategoryID')";
The last is the best IMO