$re = mysql_query("SELECT count(*) as n, (TO_DAYS( NOW( ) ) - TO_DAYS( regtime)) as `d` FROM members group by TO_DAYS( regtime) having d '; echo $rc['n']; //这个是数量}