您当前的位置:天天ASP学习数据库ACCESS → 文章内容

统计昨天今天前天记录数

作者:本站  来源:本站整理  发布时间:2019-08-13 17:55:16
dim total_today,total_yesday,total_bef_yesday
  total_today=conn.execute("select count(ip) as num from(select distinct ip from ip_to_www where  DateDiff('d',addtime,now())=0)")(0)
  total_yesday=conn.execute("select count(ip) as num from(select distinct ip from ip_to_www where  DateDiff('d',addtime,now())=1)")(0)
  total_bef_yesday=conn.execute("select count(ip) as num from(select distinct ip from ip_to_www where  DateDiff('d',addtime,now())=2)")(0)
'记录数  
ip_today=conn.execute("select co
unt(id) from ip_to_www where www='"&rs(1)&"' and DateDiff('d',addtime,now())=0")(0)
  ip_yesday=conn.execute("select count(id) from ip_to_www where www='"&rs(1)&"' and DateDiff('d',addtime,now())=1")(0)
  ip_bef_yesday=conn.execute("select count(id) from ip_to_www where www='"&rs(1)&"' and DateDiff('d',addtime,now())=2")(0)
文章评论 (评论内容只代表网友观点,与本站立场无关!)