ASP文章-24小时、本周、本月、年度排行是怎么计算的?

来源:百度知道 编辑:UC知道 时间:2024/05/29 00:25:11
24小时人气排行是点击达到一定的点击数排上去的吗?

24小时、本周、本月、年度排行是怎么计算的?

按点击率或IP数排名的

24小时就是指离now()24小时之内的点击数
本月是用month(date())和year(date())取得现在的年份和月份,然后统计该年该月的点击
sql="select cout(id) from table where year(time)="&year(date())&" and month(time)="&month(date())
年度就是直接用year(date())取得现在的年份,然后统计年份为该值的点击
sql="select cout(id) from table where year(time)="&year(date())