Search database using PHP
===

I need to do more specific search database using PHP. For that I put extra search by "category" , but for some reasons it s not working. There is no error, just query did not back with any result. Code is: 

    $q=$_GET["categ"];						 
		$con = mysql_connect( "***" , "***" , "***" );
		if (!$con)
		{
			die('Could not connect: ' . mysql_error());
		}
		// select database
		mysql_select_db("***", $con);
		$sql="SELECT distinct FROM printers WHERE category = '".$q."'";

		$result_category = mysql_query($sql) or die(mysql_error()); ;
			while($row = mysql_fetch_array($result_category))
		{
			echo  "" ;
		}
			echo "";							
		mysql_close($con);

    $priceParam = "rrp between '{$_GET['rrpmin']}' AND '{$_GET['rrpmax']}'";
		$sql = $categoryParam;
		$qry = "SELECT * FROM printers WHERE {$categoryParam}{$qryParams}{$priceParam} and discont <2 ORDER BY rrp ASC";

	

There is drop down menu for that as well to chose required values. Thanks for any hint.