|
|
|
| |
| 该到什麽地方 |
添加时间:2006-12-26 |
|
医生再叁吩咐病人说:「黄色药丸治胃痛,红色药丸治肝脏肿胀,白色药丸治心脏病。弄清楚了吗?」
病人说:「我完全明白..只希望那些药丸明白它们该到什麽地方去。」
|
|
| ·上一篇: 脚痒 ·下一篇:
<{{anext}}> 〖关闭窗口〗 |
|
|
|
<%set rs=server.createobject("adodb.recordset")
sql="select articleid,title,syxs,sort from learning where syxs>0 and sort='"&sort&"' "
rs.open sql,conn,1,1
IF Not rs.Eof Then
'//定义n为总记录数,m为要随机提取记录数,m如为随机数则可随机提取m条记录
'//注意:m<=n
dim n,m
n=rs.recordcount
m=10
'//建立随机数组
Randomize
dim k,p,tp,i
For k=0 to 100000
p=fix(rnd*n)+1
if Not instr(tp,p)>0 then
tp=tp & p & ","
i=i+1
end if
if i>=m then exit for
Next
dim t
t=split(tp,",")
For i=0 To m-1 and not rs.eof
'//根据随机数组定位记录指针
rs.absoluteposition=t(i)%>
| |
<%if rs.eof then exit for
next
end if
%>
<%
rs.close
set rs=nothing
conn.close
set conn = nothing
%>
|
|
|