ASP IF条件do循环
sql="selectxingqi,time,jiemubiao.namefromjiemubiaowherexingqilikeWeekday(CDate(now()-...
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 展开
3个回答
展开全部
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
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 then
Response.Write "无人直播"
i=1
end if
end if
rs.movenext
loop
rs.close
这样行了吧
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 then
Response.Write "无人直播"
i=1
end if
end if
rs.movenext
loop
rs.close
这样行了吧
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
if DateDiff("h",time,left(rs("time"),5))>0 and DateDiff("n",time,mid(rs("time"),7,11))<0 then
Response.Write "无人直播"
else
do while not rs.eof
ja=rs("name")
Response.Write "状态:"&jm&"直播中.."
rs.movenext
loop
end if
Response.Write "无人直播"
else
do while not rs.eof
ja=rs("name")
Response.Write "状态:"&jm&"直播中.."
rs.movenext
loop
end if
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询