ASP ACCESS 怎么求和
setrs=server.CreateObject("adodb.recordset")sql="selectsum(jiage)fromdb1wherea_idin(s...
set rs=server.CreateObject("adodb.recordset")
sql="select sum(jiage) from db1 where a_id in(select b_id from db2 )"
conn.execute sql
Response.write "alert('价格是')" & VbCrlf
Response.end
%>
怎么把 sum(jiage)用 Response.write "alert('价格是')" 输出来了 展开
sql="select sum(jiage) from db1 where a_id in(select b_id from db2 )"
conn.execute sql
Response.write "alert('价格是')" & VbCrlf
Response.end
%>
怎么把 sum(jiage)用 Response.write "alert('价格是')" 输出来了 展开
4个回答
2013-09-12
展开全部
方法一:
Dim TotalNum
set rs=server.CreateObject("adodb.recordset")
sql="select sum(jiage) from db1 where a_id in(select b_id from db2 )"
conn.execute sql
TotalNum=rs(0)
Response.write("<script>alert('价格是:"& TotalNum &"');</script>")
Response.end
方法二:
set rs=server.CreateObject("adodb.recordset")
sql="select sum(jiage) as TotalNum from db1 where a_id in(select b_id from db2 )"
conn.execute sql
Response.write("<script>alert('价格是:"& rs("TotalNum") &"');</script>")
Response.end
Dim TotalNum
set rs=server.CreateObject("adodb.recordset")
sql="select sum(jiage) from db1 where a_id in(select b_id from db2 )"
conn.execute sql
TotalNum=rs(0)
Response.write("<script>alert('价格是:"& TotalNum &"');</script>")
Response.end
方法二:
set rs=server.CreateObject("adodb.recordset")
sql="select sum(jiage) as TotalNum from db1 where a_id in(select b_id from db2 )"
conn.execute sql
Response.write("<script>alert('价格是:"& rs("TotalNum") &"');</script>")
Response.end
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-09-12
展开全部
set rs=server.CreateObject("adodb.recordset")
sql="select sum(jiage) from db1 where a_id in(select b_id from db2 )"
rs.Open sql,conn,1,1
Response.write "<script type='text/javascript'>alert('价格是"&rs(0)&"')</script>"
Response.end
sql="select sum(jiage) from db1 where a_id in(select b_id from db2 )"
rs.Open sql,conn,1,1
Response.write "<script type='text/javascript'>alert('价格是"&rs(0)&"')</script>"
Response.end
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-09-12
展开全部
用 Response.write "alert('价格是')" 输出
答案:Response.write("<script>alert('价格是:');</script>")
Response.end
答案:Response.write("<script>alert('价格是:');</script>")
Response.end
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-09-12
展开全部
求和?sum?实在回答不起 但是我这么努力回来 给我几分吧
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |