try:
$find="sometext";
mysql_connect($db,$username,$pass);
$result=mysql_query("select field from table where field like '%$find%'");
if (mysql_num_rows($result)) {
for($i=0;$i<mysql_num_rows($result);$i++)
echo mysql_result($result,$i,"field")."<br>";
}
mysql_close();
and I recommend to see at SELECT and LIKE statement from MySQL manual