u19国青队:请教大哥们个问题!~~~~~~~~

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/05 08:19:59
dim bf,year1,month1,day1,year2,month2,day2,n,y,t1,t2
bf=request("bf")
year1=request("year1")
month1=request("month1")
day1=request("day1")
year2=request("year2")
month2=request("month2")
day2=request("day2")
t1=year1 & month1 & day1
t2=year2 & month2 & day2
n=t1<=n and n<=t2

if bf="j1" then
set rs=conn.execute("select * from list where userid=" & userid & "and jdate=" & n)
else
set rs=conn.execute("select * from list where userid=" & userid & "and xdate=" & n)
end if

我是想让前台只显示规定数字之间的数据,但是显示不出来,请看看这代码是那错了?

userid是不是字符串型的,如果是要这样写
set rs=conn.execute("select * from list where userid='" & userid & "' and jdate=" & n)