trying to print the $query as suggested by cgraz is always be my first choice. Checking it by using either mysql_error() function or an if statement like the one shown below is the next.
mysql_select_db("bookorama");
$query = "select * from bookorama where ".$searchtype." like '%".$searchterm. "%'";
$result = mysql_query($query);
if (!$result){
print "something wrong with the query: " . $query;
}else{
$num_results = mysql_num_rows($result);
print "You got " $num_results . " results";;
}