Assuming that the query did not produce any errors and $result points to a valid resource:
if (mysql_num_rows($result)==0) { PERFORM ACTION }
Assuming that the query did not produce any errors and $result points to a valid resource:
if (mysql_num_rows($result)==0) { PERFORM ACTION }