列表/菜单a,a里有好几个值,如何传递里面的数值到一个SQL语句中

来源:百度知道 编辑:UC知道 时间:2024/05/14 01:47:31
有一个列表菜单a,a里有好几个值,是用SQL查询出来的
SELECT (system+'-'+description) as a
FROM dbo.systems
如何传递里面的数值,只是system的值到一个SQL语句中,
asp代码怎么弄?

第一个页面中:
<a href='abc.asp?system=值'>转到abc.asp</a>

abc.asp中:
<%
dim s
system1=request("system")'接收传过来的system值
dim cn
set cn=server.createobject("ADODB.CONNECTION")
cn.open "你的连接字串"
dim rs
set rs = Server.CreateObject("ADODB.Recordset")
rs.open "SELECT ("+system1+"+'-'+description) as a FROM dbo.systems",cn

'.....

'用response.write输出rs的结果集

'....

rs.close
set rs=nothing
cn.close
set cn=nothing
%>

不明白什么意思