谁能和我说实现日,月周点击数原理。
<!--#include file="articleconn.asp"--><%
add=request("my")
sql1="update soft set hit=hit+1 where add="&add
conn.execute(sql1)
sql="select * from soft where add="&add
set rs=conn.execute(sql)
if
rs("ttime")=day(now())
then
rs("tday")=rs("tday")+1 ‘日点击数自加1
rs("wday")=rs("wday")+1 ‘周点击数自加1
rs("mday")=rs("mday")+1 ‘月点击数自加1
rs.update
elseif
rs("wtime")=weekday(now()) '周点击数加1
rs("mday")=rs("mday")+1 '月点击数加1
rs("wday")=rs("wday")+1
rs("tday")=0
rs("ttime")=day()
rs.update
elseif
rs("mtime")=month(now())
rs("mday")=rs("mday")+1
rs("wday")=0
rs("wtime")=weekday(now())
rs.update
else
rs("mday")=0
rs("mtime")=month(now())
rs.update
end if
response.Redirect (rs("get")&"\"&rs("address"))
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
我这样试了不能用,希望高手帮我一下。