ASP IF条件do循环
来源:百度知道 编辑:UC知道 时间:2024/06/01 20:06:04
sql="select xingqi,time,jiemubiao.name from jiemubiao where xingqi like Weekday(CDate(now()-1))"
rs.Open sql,conn,1,1
do while not rs.eof
ja=rs("name")
if DateDiff("h",time,left(rs("time"),5))<=0 and DateDiff("n",time,mid(rs("time"),7,11))>=0 then
Response.Write "状态:"&jm&"直播中.."
else
Response.Write "无人直播"
end if
rs.movenext
loop
rs.close
当无人直播的时候怎么显示出很多个,怎么弄成只显示一个无人直播
看来大家都不清楚我的数据是什么样的,我现在发上来希望大家帮忙
http://mcing.cn/1.mdb
rs.Open sql,conn,1,1
do while not rs.eof
ja=rs("name")
if DateDiff("h",time,left(rs("time"),5))<=0 and DateDiff("n",time,mid(rs("time"),7,11))>=0 then
Response.Write "状态:"&jm&"直播中.."
else
Response.Write "无人直播"
end if
rs.movenext
loop
rs.close
当无人直播的时候怎么显示出很多个,怎么弄成只显示一个无人直播
看来大家都不清楚我的数据是什么样的,我现在发上来希望大家帮忙
http://mcing.cn/1.mdb
sql="select xingqi,time,jiemubiao.name from jiemubiao where xingqi like Weekday(CDate(now()-1))"
rs.Open sql,conn,1,1
if rs.eof then
Response.Write "无人直播"
else
do while not rs.eof
ja=rs("name")
if DateDiff("h",time,left(rs("time"),5))<=0 and DateDiff("n",time,mid(rs("time"),7,11))>=0 then
Response.Write "状态:"&jm&"直播中.."
end if
rs.movenext
loop
rs.close
end if
sql="select xingqi,time,jiemubiao.name from jiemubiao where xingqi like Weekday(CDate(now()-1))"
rs.Open sql,conn,1,1
i=0
do while not rs.eof
ja=rs("name")
if DateDiff("h",time,left(rs("time"),5))<=0 and DateDiff("n",time,mid(rs("time"),7,11))>=0 then
Response.Write "状态:"&jm&"直播中.."
else
if i=0