请懂asp的朋友帮帮忙
下面是段广告调用的代码,用到四个字段,content,content1,DateAndTime,LastTime
目的是想通过开始时间和结束时间来选择显示的内容
set rsad=conn.execute("select * from H_AD Where ID = "&ID&"")
If Not rsad.Eof Then
If datediff("d",now(),DateAndTime) >= 0 and datediff("d",now(),LastTime) <= 0 then
Response.Write(laoy(rsad("Content1")))
else
Response.Write(laoy(rsad("Content")))
End if
End if
rsad.close
set rsad=nothing
显示出来的结果并没有按原意显示,而是全站显示同一字段的内容,不知道是什么问题,代码是不是这样写
If datediff("掘高d",now(),DateAndTime) >= 0 and datediff("d",now(),LastTime) <= 0 then
改成
If datediff("d"轮型,now(),rsad("判桐尺DateAndTime")) >= 0 and datediff("d",now(),rsad("LastTime")) <= 0 then