- UID
- 26457
- 斋米
-
- 斋豆
-
- 回帖
- 0
- 积分
- 8553
- 在线时间
- 小时
- 注册时间
- 2012-3-1
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2013-11-1 23:10:08
|
显示全部楼层
本帖最后由 风继续吹 于 2013-11-1 23:11 编辑
0 _" B6 \( \& f9 v: F V# l( z6 o6 ^- x
+ y& M# h, I5 T( t/ V) I7 r: g我是这么写的
( J p* o% C% H5 O6 a% ]) @/ f4 V: x<%* }: v: L1 F/ J
sub historyid(id,history)
+ e$ H! h2 l2 h5 N3 s if len(history)=0 then
0 c+ F+ |! v6 o( @7 b3 a! G history=id
" `6 y0 D$ [) g elseif instr(history,id)<=0 then9 m% c {, a: \+ V7 S+ L* B
history=history&","&id3 |' |( }' A- r8 r: t. d' k
end if
8 H/ Z1 w% F4 u$ S# D$ Send sub
Z. _& A# X+ o& b6 d/ l$ F2 z0 Xhistoryid request("id"),request.cookies("history")
' Z- \3 A" o. Qresponse.cookies("history")=history$ f6 ~( ?0 G0 C: B& w. u
%>7 q8 w" {/ @& v: `3 d1 q
如果浏览的第一个页面的ID是145,那么response.cookies("history")=145
: j5 w S) x1 ^1 Q如果浏览的第二个页面得ID是45,那么response.cookies("history")还是=145
8 g8 b) Z9 T! g, g. Z2 r, |
6 Y# E; m3 x$ V如果先浏览45再浏览145那个,那么response.cookies("history")=45,145" e# [' [/ |3 W4 Z
' b1 `; P6 A4 ^9 Z- ]
就是if instr(history,id)<=0 then把两个分不开。8 P! g2 t8 N/ ]; e* i. c7 ?
7 g! X7 d6 V- D& Y- L4 W% ]+ \- O# Z1 W( V; s
) U1 }/ _0 ? K' \' ^( K: ^
后面我直接换成存数据库jilu_biao里45一条记录,145一条记录,其余的分别都一条记录,然后再循环输出就可以解决
5 k/ t7 ^& V( H% _9 ^: h. b% k
: V+ s6 ]1 o, u; O! Z# j! l<%
k8 G! X6 q2 d' ^4 zset rs=server.createobject("adodb.recordset"); p* h8 `" H- m8 v) v9 u
rs.open "select * from jilu_biao where userid="&userid,conn,1,1
. n. p1 _6 H8 R% W) i! |% zif not(rs.eof and rs.bof) then) e$ t. S; l# f) m! @0 c$ o
set s=server.createobject("adodb.recordset")- K0 {* M& x5 }* [
do while not rs.eof
% v5 @' P" m' v# _- k- ?$ v s.open "select * from data_biao where id="&rs("id"),conn,1,1
1 S! Y- E( i6 l( V! c- j# ?1 c- C- m+ q; x0 ~
'以下省略............
8 |& f q' M: H' ]1 \+ z# c7 f! ?/ k3 X+ h g) P& t1 ~8 n. }; t
%> |
|