主题:" ' 的问题
<%px=request.QueryString("sort")
if px="" then
px="id"
end if
set rs=server.CreateObject("adodb.recordset")
if request.form("submit")<>empty then
dim a
dim b
dim c
a=request.Form("select2")
b=request.Form("guanjianci")
c=request.Form("select")
if c=jingque then
rs.open "select * from product where '"&a&"'='"&b&"' order by "&px&"",conn,1,1
else
rs.open "select * from product where '"&a&"'like '%'"&b&"'%' order by "&px&"",conn,1,1
end if
else
rs.open "select * from product order by "&px&"",conn,1,1
end if
%>
当条件中全是变量是" '应该如何使用啊?
上面好多错误,如何改啊?
if px="" then
px="id"
end if
set rs=server.CreateObject("adodb.recordset")
if request.form("submit")<>empty then
dim a
dim b
dim c
a=request.Form("select2")
b=request.Form("guanjianci")
c=request.Form("select")
if c=jingque then
rs.open "select * from product where '"&a&"'='"&b&"' order by "&px&"",conn,1,1
else
rs.open "select * from product where '"&a&"'like '%'"&b&"'%' order by "&px&"",conn,1,1
end if
else
rs.open "select * from product order by "&px&"",conn,1,1
end if
%>
当条件中全是变量是" '应该如何使用啊?
上面好多错误,如何改啊?