Search engine

So I have a site and everything works fine and at some time in the script there is a mysql request “SELECT * FROM…” and so on and I want if the result is an empty row to display text and else display the data.At the moment no matter the return data from server it still echoes the table with results(it’s a search engine), but only the heading, as it is out of the loop cycle used to write each row of the results.I use the $query = “” and $result = mysql_query($query) system if it matters.I hope someone got the idea.Thank you in advance
Thanks,I did not know there was such a function.Now that I know about it it’s child’s play to alter my script.