|
|
|
| 随机爆笑图片 | ·什么东西天气越热,它爬的越高?[答案] | 更多搞笑..... | |
<%
set rs=server.createobject("adodb.recordset")
sql="select picid,picname,picsy,spicurl from pic where picsy>0"
rs.open sql,conn,1,1
IF Not rs.Eof Then
'//定义n为总记录数,m为要随机提取记录数,m如为随机数则可随机提取m条记录
'//注意:m<=n
dim n,m
n=rs.recordcount
m=3
'//建立随机数组
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
%> | | 笑话连篇十年少 | ·人在什么情况下会真的七窍生烟?
[答案] | 更多笑话..... | |
<%
dim sort
sort="暴笑网文"
set rs=server.createobject("adodb.recordset")
sql="select articleid,title,hits,syxs,sort from learning where syxs<>0 and sort<>'"&sort&"' order by dateandtime desc"
rs.open sql,conn,1,1
n=0
do while not rs.eof
%> |
| <% rs.movenext%> | <%
n=n+1
rs.movenext
if n>=8 then exit do
loop
rs.close
set rs=nothing
%> |
| 搞笑图片连轴转 | ·为什么女人穿高跟鞋后,就代表她快结婚了?
[答案] | 更多笑话..... | |
<%
set rs=server.createobject("adodb.recordset")
sql="select picid,picname,pichits from pic where picsy<>0 order by adate desc"
rs.open sql,conn,1,1
nn=0
do while not rs.eof
%> |
| <% rs.movenext%> | <%
nn=nn+1
rs.movenext
if nn>=8 then exit do
loop
rs.close
set rs=nothing
%> |
| 爆笑网文乐翻天 | ·有一位女士离婚数次
打一四字成语 [答案] | 更多笑话..... | |
<%
set rs=server.createobject("adodb.recordset")
sql="select articleid,title,hits,sort,syxs from learning where syxs<>0 and sort='"&sort&"' order by dateandtime desc"
rs.open sql,conn,1,1
n=0
do while not rs.eof
%> |
| <% rs.movenext%> | <%
n=n+1
rs.movenext
if n>=8 then exit do
loop
rs.close
set rs=nothing
%> |
|
|