$result = mysql_query(“SELECT * FROM table1″, $link);

$num_rows = mysql_num_rows($result);

if ($num_rows==0){

echo “记录集为空”;

}