ASP 如何获取select count(*) from tablename 返回的值
sql2="selectcount(wenba_id)asnumsfromreplywenbawherewenba_id="&id&""这样调用不行<%=rs2("num...
sql2="select count(wenba_id) as nums from replywenba where wenba_id="&id&""这样调用不行<%=rs2("nums")%>求高手帮忙..
展开
2个回答
2013-05-26
展开全部
<% dim id,i
id=rs("id")
set rs2=server.createobject("adodb.recordset")
sql2="select count(wenba_id) as nums from replywenba where wenba_id="&id&""
rs2.open conn,sql2,1,2
%>
<%=rs2(0)%>
<%rs2.close%>
id=rs("id")
set rs2=server.createobject("adodb.recordset")
sql2="select count(wenba_id) as nums from replywenba where wenba_id="&id&""
rs2.open conn,sql2,1,2
%>
<%=rs2(0)%>
<%rs2.close%>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-05-26
展开全部
wenba_id=&'"+id+"'&"
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询