- UID
- 26457
- 斋米
-
- 斋豆
-
- 回帖
- 0
- 积分
- 8553
- 在线时间
- 小时
- 注册时间
- 2012-3-1
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2013-11-1 23:10:08
|
显示全部楼层
本帖最后由 风继续吹 于 2013-11-1 23:11 编辑
- f, |8 p7 x- h
4 P# c7 Z) R% A+ G7 }2 M2 G" G# j$ e+ {6 l( Q
我是这么写的
7 R% f# N+ J6 N) G0 s<%
- D) r3 [9 x4 H8 |3 Jsub historyid(id,history)
: g' {% I" Y0 v w1 g if len(history)=0 then9 I6 Y4 k/ G" F
history=id
' k0 S* C* a; F! ^. h elseif instr(history,id)<=0 then. i( |+ O; a* Y/ [! k
history=history&","&id
& x% T1 ^( l* I end if
' ]9 }$ i" d: yend sub) T4 F0 X; h: `% X% w
historyid request("id"),request.cookies("history")
" ]7 ^4 |* [+ |+ Oresponse.cookies("history")=history
! j# ?! a4 t- A4 l8 z5 L1 a) l n%>
' t3 U- S7 f- a) p/ m如果浏览的第一个页面的ID是145,那么response.cookies("history")=1456 a$ z) m8 G/ q( J( M
如果浏览的第二个页面得ID是45,那么response.cookies("history")还是=145
" P; ?; s/ g$ h/ {0 F5 r! O9 Q( r' Z, Y1 n4 \* W5 C' ~/ N
如果先浏览45再浏览145那个,那么response.cookies("history")=45,1454 x" }2 i* y+ s0 \/ x% y7 J
- D) \- S3 X" d/ X% g9 _
就是if instr(history,id)<=0 then把两个分不开。
$ k. w* m$ \2 r- t B9 O- x2 j' V3 e6 a3 F% P9 t
) v1 I5 ]6 N$ H2 `* M
+ J1 _+ O3 o8 T9 R8 w" R. [2 v后面我直接换成存数据库jilu_biao里45一条记录,145一条记录,其余的分别都一条记录,然后再循环输出就可以解决
( u. p- Q6 b/ f8 [ u' n) r% y l, @4 H4 b: D' z# e2 f+ K1 L2 |
<%
$ ^; O( W$ F9 k- h0 J4 |8 X2 |* ^5 Jset rs=server.createobject("adodb.recordset")( ]: E- }4 N& t& k' }- D# j
rs.open "select * from jilu_biao where userid="&userid,conn,1,12 c. d9 j4 I" `: T. N5 ]$ ?0 Z! e
if not(rs.eof and rs.bof) then
$ ^: ?% F6 q0 L+ L+ s set s=server.createobject("adodb.recordset")( r" l9 t8 G; _6 e# r
do while not rs.eof
, l* \- b, b* n* r* b s.open "select * from data_biao where id="&rs("id"),conn,1,1
$ t4 }( D2 V9 t- ^3 u
, `- g4 z1 Z3 |, x' K+ G '以下省略............" T3 c; l5 }. Y4 C7 P) F& q: w
9 C' a: \3 u( P3 h1 w%> |
|