if request("nclass")="" and request("sheng")="" and request("mj")="" then
response.redirect "main.asp"
end if
if request("sheng")<>"" then
sheng=request("sheng")
end if
if request("mj")<>"" then
mj=split(request("mj"),"-")
mjs=Cint(mj(0))
mjb=Cint(mj(1))
end if
尤其是下面的代码,是通过组合来查询的,数值型变量如何表示呢,例如:xmj>=mjs and xmj<=mjb,变量要加什么符号吗?
if request("sheng")<>"" and request("mj")<>"" then
sql="SELECT nclass, shengname, xdata, xid, xinfo, xqy FROM v_workshop where nclassid="&nclassid&" and shengid="&sheng&" and xmj>=mjs and xmj<=mjb"
end if
if request("sheng")="" and request("mj")<>"" then
sql="SELECT nclass, shengname, xdata, xid, xinfo, xqy FROM v_workshop where nclassid="&nclassid&" and shengid="&sheng&""
end if
if request("sheng")<>"" and request("mj")="" then
sql="SELECT nclass, shengname, xdata, xid, xinfo, xqy FROM v_workshop where nclassid="&nclassid&" and xmj>=mjs and xmj<=mjb"
end if