mysql查詢記錄表,mysql查詢一周內每天的記錄數?
$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']; //這個是數量}
$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']; //這個是數量}