楼上的朋友,我按你说的去做了,还是不行. 大家再快来看,我下面的又错在哪里? 我想在用户发帖时,在表forum设计createdate项专门来记录发表的日期.然后如下读取"今日发帖": strSQL = "Select * from forum where createdate=date()" rs.open strSQL if rs.RecordCount>0 then ztcount=rs.RecordCount else ztcount=0 end if response.write("今日发帖:"&ztcount)
strSQL = "Select * from forum where datediff(d,createdate,Now())=0" rs.open strSQL if rs.RecordCount>0 then ztcount=rs.RecordCount else ztcount=0 end if response.write("今日发帖:"&ztcount) 把你们两个的综合一下不是就OK 了吗
<% strSQL = "Select * from jrbt" rs.open strSQL '//首先打开表 if rs("add_date")=date() then rs("jr")=rs("jr")+1 else rs("add_date")=date() rs("jr")=1 end if '//如果日期是今天的,那么数量加1,否则把日期设为今天的,今日的贴1