再次挑战在线统计人数
如果不使用数据库,而用数组又应该怎样实现在线人数统计、并显示在线用户? 请各位高手指点迷津!!!!
sessionID = session.SessionID aaa = dateadd("n", -timeout, now())'"n"是分钟s是秒,m是月 conn.Execute ("delete * from online where postdate < #" & aaa & "#") sql0 = "select sess from online where sess='" & sessionID & "'" set rscheck = conn.Execute (sql0) if rscheck.eof then
sql = "insert into online (sess,postdate) values('" & sessionID & "', '" & now() & "')" conn.Execute (sql)
sql2 = "select count(sess) from online" set rsonline = conn.Execute (sql2) online = rsonline(0) rsonline.close
用session,往库里写,然后读,,,用sum加,,呵呵,明白了吗,,,,,??????!?!?
利用global.asa统计在线人数
不用global.asa和session统计在线人数