ASp中执行sql语句回显
selectstrareafromusermgwherestruser="maoxi"查询maoxi管理用户对应的区服selectcount(*)asstrGameGro...
select strarea from usermg where struser="maoxi"
查询maoxi管理用户对应的区服
select count(*) as strGameGroup from GameInfo where strGameGroup="华容小道"
查询华容小道这个区服 有多少用户
我用access数据库查询工具查询执行成功
怎么写一个ASP文件执行这两个命令并且有回显 展开
查询maoxi管理用户对应的区服
select count(*) as strGameGroup from GameInfo where strGameGroup="华容小道"
查询华容小道这个区服 有多少用户
我用access数据库查询工具查询执行成功
怎么写一个ASP文件执行这两个命令并且有回显 展开
3个回答
展开全部
我来写写吧,哈哈
a="maoxi"
sql="select strarea from usermg where struser='"&a&"'"
set rs=server.createobject("adodb.recordset")
rs.open conn,sql,1,1
response.write rs("strarea")
sql="select count(*) as strGameGroup from GameInfo where strGameGroup='华容小道'"
conn.execute("sql")
response.write strgamegroup
a="maoxi"
sql="select strarea from usermg where struser='"&a&"'"
set rs=server.createobject("adodb.recordset")
rs.open conn,sql,1,1
response.write rs("strarea")
sql="select count(*) as strGameGroup from GameInfo where strGameGroup='华容小道'"
conn.execute("sql")
response.write strgamegroup
展开全部
<%
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath(你的access数据库名称)
sql="select strarea from usermg where struser='maoxi'"
set rs=conn.execute(sql)
if not(rs.eof and rs.bof) then
response.write "maoxi管理用户对应的区服为"&rs(0)&"<br>"
end if
sql="select count(*) as strGameGroup from GameInfo where strGameGroup='华容小道'"
set rs=conn.execute(sql)
if not(rs.eof and rs.bof) then
response.write "华容小道这个区服有"&rs(0)&"个用户"
end if
%>
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath(你的access数据库名称)
sql="select strarea from usermg where struser='maoxi'"
set rs=conn.execute(sql)
if not(rs.eof and rs.bof) then
response.write "maoxi管理用户对应的区服为"&rs(0)&"<br>"
end if
sql="select count(*) as strGameGroup from GameInfo where strGameGroup='华容小道'"
set rs=conn.execute(sql)
if not(rs.eof and rs.bof) then
response.write "华容小道这个区服有"&rs(0)&"个用户"
end if
%>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
郁闷,没听懂
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询