主题:rootid为备注型数据,如果不想显示rst.rootid=21,是不是在哪个位置加上语句:“if
rootid为备注型数据,如果不想显示rst.rootid=21,是不是在哪个位置加上语句:“if rst.rootid="21" then not response.write tempcatastr”,但是我不知道具体位置啊,谢谢帮助!
<%
set rst=server.CreateObject("adodb.recordset")
sqlt="Select * from newscata order by rootid"
rst.Open sqlt,conn,1,3
do while not rst.EOF
tempcataStr="<tr valign=center align=middle bgcolor=#ffffff>"
tempcataStr=tempcataStr&"<td onMouseOver=mOvr(this,'#ffffff'); onMouseOut=mOut(this,'#f5f5f5'); bgcolor=#f5f5f5 height=25>"
tempcataStr=tempcataStr&"<div align=right><a href=default.asp?cataid="&trim(rst("id"))&">"&trim(rst("title"))&"</a> <img src='../images/pot_11.gif'> </div></td>"
tempcataStr=tempcataStr&"<tr>"
tempcataStr=tempcataStr&"<td bgcolor=#f5f5f5>"
tempcataStr=tempcataStr&"<table cellspacing=0 cellpadding=0 width=80% align=center border=0>"
tempcataStr=tempcataStr&"<tbody>"
tempcataStr=tempcataStr&"<tr> "
tempcataStr=tempcataStr&"<td width='100%' background='../images/line_3.gif' height=1></td>"
tempcataStr=tempcataStr&"</tr>"
tempcataStr=tempcataStr&"</tbody>"
tempcataStr=tempcataStr&"</table>"
tempcataStr=tempcataStr&"</td>"
tempcataStr=tempcataStr&"</tr>"
Response.Write tempcataStr
rst.MoveNext
loop
rst.Close()
set rst=nothing
%>
<%
set rst=server.CreateObject("adodb.recordset")
sqlt="Select * from newscata order by rootid"
rst.Open sqlt,conn,1,3
do while not rst.EOF
tempcataStr="<tr valign=center align=middle bgcolor=#ffffff>"
tempcataStr=tempcataStr&"<td onMouseOver=mOvr(this,'#ffffff'); onMouseOut=mOut(this,'#f5f5f5'); bgcolor=#f5f5f5 height=25>"
tempcataStr=tempcataStr&"<div align=right><a href=default.asp?cataid="&trim(rst("id"))&">"&trim(rst("title"))&"</a> <img src='../images/pot_11.gif'> </div></td>"
tempcataStr=tempcataStr&"<tr>"
tempcataStr=tempcataStr&"<td bgcolor=#f5f5f5>"
tempcataStr=tempcataStr&"<table cellspacing=0 cellpadding=0 width=80% align=center border=0>"
tempcataStr=tempcataStr&"<tbody>"
tempcataStr=tempcataStr&"<tr> "
tempcataStr=tempcataStr&"<td width='100%' background='../images/line_3.gif' height=1></td>"
tempcataStr=tempcataStr&"</tr>"
tempcataStr=tempcataStr&"</tbody>"
tempcataStr=tempcataStr&"</table>"
tempcataStr=tempcataStr&"</td>"
tempcataStr=tempcataStr&"</tr>"
Response.Write tempcataStr
rst.MoveNext
loop
rst.Close()
set rst=nothing
%>