如何统计最高日发贴数。。。???

wqross522 2008-03-25 11:15:40
如何统计最高日发贴数。。。???
求大虾们详细指教。。。。???
...全文
161 8 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
银狐被占用 2008-03-25
  • 打赏
  • 举报
回复
select count(*) from tb where convert(varchar(10),datetime,120)=今天 group by day(datetime)
银狐被占用 2008-03-25
  • 打赏
  • 举报
回复
select count(*) from tb where ... group by day(datetime)
xkdxiaocainiao 2008-03-25
  • 打赏
  • 举报
回复
这个应该不难
suano 2008-03-25
  • 打赏
  • 举报
回复
设一个最高日发贴数字段,然后在每天的某个时候获得当然总共发贴数,与设定的最高发帖数对比,如果多则替换,基本就这个思路
liuyann 2008-03-25
  • 打赏
  • 举报
回复

你的表结构是什么? 数据样本是什么?
总不能让我们猜吧
== 思想重于技巧 ==
jiangsh100 2008-03-25
  • 打赏
  • 举报
回复
行.不过我不会写.哈哈
wqross522 2008-03-25
  • 打赏
  • 举报
回复
表名称:bbstitle
发贴时间:dateh
这样行吗?
wqross522 2008-03-25
  • 打赏
  • 举报
回复
'今日发贴
myarray=split(formatdatetime(now(),2),"-",-1,1)
yy=myarray(0)
mm=myarray(1)
dd=myarray(2)
sqlstr="select count(id) as daytotal from bbstitle where year(dateh)='"&yy&"' and month(dateh)='"&mm&"' and day(dateh)='"&dd&"'"
set rs=conn1.execute(sqlstr)
daytotal=rs("daytotal")
rs.close
'昨日发贴
sqlstr="select count(id) as daytotal from bbstitle where year(dateh)='"&yy&"' and month(dateh)='"&mm&"' and day(dateh)='"&dd-1&"'"
set rs=conn1.execute(sqlstr)
zttotal=rs("daytotal")
rs.close
'最高日发贴
sqlstr="select count(id) as daytotal from bbstitle where year(dateh)='"&yy&"' and month(dateh)='"&mm&"' and day(dateh)='"&dd-1&"'"
set rs=conn1.execute(sqlstr)
zgtotal=rs("daytotal")
rs.close

?????????????????????????我还想统计最高日发贴和一周热贴???????????????
希望大峡们详细指点?????谢谢你们了

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧