28,391
社区成员
发帖
与我相关
我的任务
分享
<!-- #include file="../conn_noclock.asp" -->
<%
'批量修改所有记录
dim sql,rs
Dim swTime,swOutTime, xwTime, xwOutTime, swRnd, swOutRnd, xwRnd,xwOutRnd, dailydate
set rs=server.createobject("adodb.recordset")
sql="select * from Tsignupinfo where swqdzt=2 or swqtzt=2 or xwqdzt=2 or xwqtzt=2"
rs.open sql,conn,1,3
Do While not rs.eof
swRnd = 1800*Rnd '浮动30分随机数
swOutRnd = 3600*Rnd
xwRnd = 3600*Rnd
xwOutRnd = 3600*Rnd
swTime = DateAdd("s", swRnd, "07:45:00")
swOutTime = DateAdd("s", swOutRnd, "11:45:00")
xwTime = DateAdd("s", xwRnd, "13:45:00")
xwOutTime = DateAdd("s", xwOutRnd, "17:15:00")
conn.Execute "update Tsignupinfo set swqd='"&swTime&"', swqt='"&swOutTime&"', xwqd='"&xwTime&"', xwqt=,'"&xwOutTime&"', swqdzt='1', swqtzt='1', xwqdzt='1', xwqtzt='1') where swqdzt=2 or swqtzt=2 or xwqdzt=2 or xwqtzt=2"
End If
rs.moveNext
Loop
rs.close
Response.write "批量修改所有记录数据成功!"
set rs=nothing
%>
系统将于<span id="BackSecs" style="color: #F00;"></span>秒后自动返回...
<script>function countDown(Secs) {
BackSecs.innerText=Secs;
if(Secs>0) {
setTimeout("countDown("+Secs+"-1)",1000);
}
else {
window.location=document.referrer;
}
}
countDown(5);
</script>