I currently use this method:
//Have a query
$query = "Select * From Table";
//Query it
$result = mysql_query("$query");
//Then I copy the query cuz on my system it truncates the results to 0
$result_copy = mysql_query("$query");
//Then I fetch it from an array like so
if (! mysql_fetch_array($result_copy))
{
//insert code for the part where you turn up no results, fails, etc, etc
}
else
{
//insert code for the part where the query is successful
}
This is good if you have no results and do not want any warnings or errors popping up.