统计每月网站访问量出错了,请高手进来看看!
我的设计过程为:
网站的访问统计,为了统计每天的访问量,我做的做法为,
for i=31 to 1 step -1
rs.open"select * from [table] where day(jointime)='"&i&"'",conn,1,1
......
next
问题出在:有些月份没有31号,导致程序出错
出错信息为:
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
Microsoft VBScript 运行时错误 错误 '800a005e'
无效使用 Null: 'round'
/data/list_day.asp,行42
结果改成:
for i=31 to 1 step -1
rs.open"select * from [table] where day(jointime)='"&i&"'",conn,1,1
if rs.recordcount=0 then exit for
......
next
还是出错。