I'm not sure, but I think you could do like this:
<?php
# connection stuff here...
$query = "SELECT * FROM table";
$result = mysql_query($query);
$rows = mysql_num_rows($result);
if($rows > 0)
{
echo "Result found";
}
else
{
echo "Nothing found...";
}
?>