prova con

$query = mysql_query("select * from tabella where campo like '%$quellochevuoicercar'");