yes. Rod is wrong this time ;-)
mysql_query returns false only in case of failure
in case you want to check if there were no results, mysql_num_rows() is your friend. It can ***only*** be used when the returned value of mysql_query() was TRUE, oeuf corse.
so again ther structure to use is the one explained in the online manual, ie
$linkid=mysql_connect(); // also select db etc...
$query="...";
$result=mysql_query($query,$linkid); // or die("failed on '$query' with error = ".mysql_error());
if ($result!==FALSE) { // query ok
if (($a=mysql_num_rows($result))>0) { // dataset contains at least oen row returned
// echo "$a rows returnd"; // now is time to use : while ($res=mysql_fetch_array($result)) { etc }
} else { // no rows returned
// echo "no rows returned";
}
} else { // query failed
// die("query failed"); ?
}
not checked against typos.