有一种方案如下:
openDb.executeQuery("update onlineuser set logondate=sysdate where username='"+name+"'");
如果用户在线的话,把logondate记为当前时间
openDb.executeQuery("delete from onlineuser where (logondate+1/360)<sysdate");
如果用户最后在线时间与当前时间大于4分钟,说明用户已经离开,在onlineuser中删除此用户
如果这两句sql语句都写在iframe中,当用户离线时,iframe也关闭了,第二句
openDb.executeQuery("delete from onlineuser where (logondate+1/360)<sysdate");怎么执行呢???