ASP随机函数问题,请教一下前辈们
rerok 2009-03-20 04:16:39 sub SetRed_ads
sql="select top "&fineMathematics&" Gq_sfdata.id,Gq_sfdata.name,Gq_sfdata.IP,Gq_sfdata.service,Gq_sfdata.Sdate,Gq_sfdata.hour,Gq_sfdata.minute,Gq_sfdata.addr,Gq_sfdata.QQ,Gq_sfdata.xingzhi,Gq_sfdata.homepage,Gq_sfdata.download,Gq_sfdata.gameid,Gq_GameType.game,Gq_sfdata.download,Gq_sfdata.fine,Gq_sfdata.finetime,Gq_sfdata.time"
sql=sql&" from Gq_sfdata,Gq_GameType where Gq_sfdata.gameid=Gq_GameType.id"
sql=sql&" and Gq_sfdata.ulock=1 and Gq_sfdata.fine=1 and Gq_sfdata.gameid="&indexsf&" order by Gq_sfdata.hour,Gq_sfdata.minute"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
rs.close
else
while not rs.eof
if checkday(rs("finetime"),rs("time")) then
Response.Write "<TR bgColor="&bg_1&" onmouseover=javascript:this.bgColor='"&bg_1_1&"' onmouseout=javascript:this.bgColor='"&bg_1&"'>"
Response.Write "<TD width="&w1&" align=center><a href="&weburl&"/go.htm?u="&rs("homepage")&" target=_blank><font color=#FF0000 >"&rs("name")&"</font></a></TD>"
Response.Write "<TD width="&w2&"><a href="&weburl&"/go.htm?u="&rs("homepage")&" target=_blank>"&rs("IP")&"</a></TD>"
%>
<TD width="<%=w3%>">
<font color=#FF0000><b>→全天极力推荐←</b>
<%
Response.Write "</TD>"
if (rs("Service"))=0 then
Response.Write "<TD width="&w4&" align=center>"&rs("Addr")&""&split(ssign,",")(rs("Service"))&"</TD>"
else
if (rs("Service"))=1 then
Response.Write "<TD width="&w4&" align=center><font color=blue>"&rs("Addr")&""&split(ssign,",")(rs("Service"))&"</font></TD>"
else
Response.Write "<TD width="&w4&" align=center><font color=black>"&rs("Addr")&""&split(ssign,",")(rs("Service"))&"</font></TD>"
end if
end if
Response.Write "<TD>"&rs("xingzhi")&"-<img border='0' src='Skin/Are/hot.gif' width='26' height='13'></TD>"
Response.Write "<TD width="&w5&">客服QQ:"&rs("QQ")&"</TD>"
Response.Write "<TD align=""center"" width="&w6&"><a href="&weburl&"/go.htm?u="&rs("homepage")&" target=_blank><font color=#FF0000>点击进入<img border='0' src='Skin/Div_XunCms/New.gif'></font></a></TD>"
Response.Write "</TR>"
end if
rs.movenext
wend
rs.close
end if
end sub
以上代码是一个列出AC数据库是发布来后是按时间序顺排列的,但我想让他变成随机性的,请问怎么解决呢。
我刚从HTML过来的,很多语句都不懂,望前辈们指教