我做的是在线统计,(目前有几个人在线),麻烦大侠帮我看看,不知道怎么,
老提示<%myconn.execute("delete*from online where ltime<now-0.005")这行错误。请大家给些提示!谢谢。
<%
Server.ScriptTimeout="10"
Set myconn = Server.CreateObject("ADODB.Connection")
myconn.open sql,conn,3,2
%>
<%myconn.execute("delete*from online where ltime<now-0.005")
lgname=Request.Cookies("lgname")
ip=request.servervariables("remote_addr")
if lgname="" then
set jilu=myconn.execute("select ip from online where ip='"&ip&"'")
if jilu.eof then
set jilu=nothing
myconn.execute("insert into online (ip,ltime)VALUES('"&ip&"','"&now&"')")
else
myconn.execute("update online set ltime='"&now&"' where ip='"&ip&"'")
end if
end if
if lgname<>"" then
set ujilu=myconn.execute("select name from online where name='"&lgname&"'")
if ujilu.eof then
set ujilu=nothing
myconn.execute("insert into online (name,ltime)VALUES('"&lgname&"','"&now&"')")
else
myconn.execute("update online set ltime='"&now&"' where name='"&name&"'")
end if
end if
set aaa1=myconn.execute("Select count(ltime)from online where name<>''")
usno=aaa1(0)
set aaa1=nothing
set aaa2=myconn.execute("Select count(ltime)from online")
lineno=aaa2(0)
nusno=lineno-usno
%>