ASP判断执行
来源:百度知道 编辑:UC知道 时间:2024/05/09 20:21:32
<!-- #include file ="db.inc.asp" -->
<html>
<body>
<%
set rs=server.createobject("ADODB.Recordset")
sql="select count(p_pl) from blog_pl where i_id=1"
rs.open sql,conn,1,1
%>
<%=rs.recordcount%>
</body>
</html>
可以运行``但不会判断````请高手指点下`
<html>
<body>
<%
set rs=server.createobject("ADODB.Recordset")
sql="select count(p_pl) from blog_pl where i_id=1"
rs.open sql,conn,1,1
%>
<%=rs.recordcount%>
</body>
</html>
可以运行``但不会判断````请高手指点下`
<!-- #include file ="db.inc.asp" -->
<html>
<body>
<%
set rs=server.createobject("ADODB.Recordset")
sql="select count(p_pl) from blog_pl where i_id=1"
rs.open sql,conn,1,1
if rs.eof and rs.bof then'如果记录集为空
response.write "没有找到记录"
else
response.write "共找到"&rs.recordcount&"条记录"
end if
rs.close
%>
</body>
</html>