在asp中怎样根据数据库中失效日期(日期型字段)与当前日期相比较,列出过期商品?先谢了!!
set rs=server.CreateObject("adodb.recordset")
sql = "select * from 表 where 失效日期<now()"
rs.open sql,conn,1,1
while not rs.eof
response.write(rs("商品名称") & "<br>")
rs.movenext
wend
rs.close
set rs=nothing
set rs=server.CreateObject("adodb.recordset")
sql = "select * from 表 where 失效日期<now()"
rs.open sql,conn,1,1
while not rs.eof
response.write(rs("商品名称") & "<br>")
rs.movenext
wend
rs.close
set rs=nothing