$stmtusercount);
print "添加成功到统计表中。";
}else{
$tmptime=time(); //取得临时用户时间
$temuserid= $arrtest[$b][0];
$stmt = ociparse($conn, "update tb_onlineuser set d_logintime=$tmptime where n_onlineuserid='$temuserid'");
ociexecute($stmt);
print "更新成功";
print $tmptime;
}
}else{
print session_id();
print "系统时间:".$nowtime."<br>";
print "数据库中旧时间:".$arrtest[$b][1]."<br>";
print "用户id:".$arrtest[$b][0]."<br>";
print "相差时间:".ceil(($nowtime-$arrtest[$b][1])/60)."<br>";
}
}
}
/*如果要欢察统计表与在线表用户时间(当用户未离线时)
select a.d_logintime,b.d_logintime from tb_onlineuser a,tb_onlineusercount b
where a.n_onlineid=b.n_onlineid; 相差
如果要统计出指定用户在线时间(当用户离线时)
select d_logintime,d_overtime from tb_onlineusercount where n_onlineuserid='$userid'; 相差
*/
?>
谢谢你的帮助!:_)
print "添加成功到统计表中。";
}else{
$tmptime=time(); //取得临时用户时间
$temuserid= $arrtest[$b][0];
$stmt = ociparse($conn, "update tb_onlineuser set d_logintime=$tmptime where n_onlineuserid='$temuserid'");
ociexecute($stmt);
print "更新成功";
print $tmptime;
}
}else{
print session_id();
print "系统时间:".$nowtime."<br>";
print "数据库中旧时间:".$arrtest[$b][1]."<br>";
print "用户id:".$arrtest[$b][0]."<br>";
print "相差时间:".ceil(($nowtime-$arrtest[$b][1])/60)."<br>";
}
}
}
/*如果要欢察统计表与在线表用户时间(当用户未离线时)
select a.d_logintime,b.d_logintime from tb_onlineuser a,tb_onlineusercount b
where a.n_onlineid=b.n_onlineid; 相差
如果要统计出指定用户在线时间(当用户离线时)
select d_logintime,d_overtime from tb_onlineusercount where n_onlineuserid='$userid'; 相差
*/
?>
谢谢你的帮助!:_)
| 对此文章发表了评论 |
