復制代碼 代碼如下:
SELECT * FROM `p8_memberdata` where regdate BETWEEN (UNIX_TIMESTAMP(NOW())-86440) AND NOW()
SELECT * FROM `p8_memberdata` WHERE DATE_FORMAT(FROM_UNIXTIME(regdate),'%Y-%m-%d')= DATE_FORMAT(NOW(),'%Y-%m-%d') order by uid desc
第一條最好顯示過去24小時過去1周等
第二條獲得當天信息