22,210
社区成员
发帖
与我相关
我的任务
分享
create index idx_01 on UserList (UserID)
create index idx_01 on LuckJoin (UserID)
<%
Beilv=10 '倍率
Set rs=server.CreateObject("adodb.recordset")
Rs.open "select UserID,Point,IsOper from LuckJoin where NumID=1000",conn,1,1
If not Rs.eof then
Do while not Rs.eof
UserID=rs("UserID") '用户ID
UserLuckPoint=Rs("Point") '积分
MyPrizePoint=UserLuckPoint*Beilv '应获得积分
'将积分写入用户表
conn.execute("update UserList Set UserPoint=UserPoint+"&MyPrizePoint&" where UserID="&UserID&";update LuckJoin set IsOper=2 where Userid=" & UserId)
rem rs("IsOper")=2 '标记已经运行,避免程序错误等引起的漏操作。
rem rs.update()
rs.movenext
loop
End If
rs.close
set rs=nothing
%>