主题:  求教

yufang

职务:普通成员
等级:1
金币:0.0
发贴:108
#12003/10/22 12:42:40
从数据库中读取一组数据
分多页显示

要求每读一页计费一次
重复看不计费
请问该怎么做

if CSTR(currentPage) IN session("money") then
response.write "eee have read"
else
response.write " NO eee have read!!!"
session("money")=session("money")+","+cstr(currentPage)
end if
当然这是错误的程序
希望高手指点



dbzllx

职务:普通成员
等级:1
金币:0.0
发贴:1
#22003/10/22 13:27:22
方法一:
session("money")初始时
session("money")=“,”
以后
if Instr(session("money") ,","&CSTR(currentPage)&",")>=1 then
response.write "eee have read"
else
response.write " NO eee have read!!!"
session("money")=session("money")&cstr(currentPage)&","
end if



yufang

职务:普通成员
等级:1
金币:0.0
发贴:108
#32003/10/22 13:33:50
每次输出的都是NO eee have read!!!



yufang

职务:普通成员
等级:1
金币:0.0
发贴:108
#42003/10/22 14:05:06
搞定了
改了点
if Instr(session("money"),CSTR(currentPage))>=1 then
response.write "eee have read"
else
response.write " NO eee have read!!!"
session("money")=session("money")+","+cstr(currentPage)
response.Write session("money")
end if