asp中sql按变量查询问题
A页<ahref="product_woodframe.asp?type=wood">'A页设定变量type等于值woodB页setconn=server.createo...
A页
<a href="product_woodframe.asp?type=wood">'A页设定变量type等于值wood
B页
set conn=server.createobject("adodb.connection")
conn.open("DRIVER={sql server};server=web;uid=sa;pwd=Jchoman+0#;database=jihua")
set Recordset1=server.createobject("adodb.recordset")
sql= "SELECT * FROM dbo.product_all WHERE 类型=Request.QueryString("type")"
'这里的条件查询按A页的type值来查询该怎么写? 展开
<a href="product_woodframe.asp?type=wood">'A页设定变量type等于值wood
B页
set conn=server.createobject("adodb.connection")
conn.open("DRIVER={sql server};server=web;uid=sa;pwd=Jchoman+0#;database=jihua")
set Recordset1=server.createobject("adodb.recordset")
sql= "SELECT * FROM dbo.product_all WHERE 类型=Request.QueryString("type")"
'这里的条件查询按A页的type值来查询该怎么写? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询