求高手注释以下代码,先谢了
xh=trim(request.querystring("xh"))
stuname=trim(request.querystring("stuname"))
team=trim(request.querystring("team"))
set rs=conn.execute("select cxsetup from cominfo")
cxsetup=rs("cxsetup").value
rs.close
set rs=nothing
if team="all" then
sql="select * from studentpmb where stuidh='"&xh&"' and stuname='"&stuname&"'"
team="当前时段所有项目"
else
sql="select * from studentpmb where stuidh='"&xh&"' and stuname='"&stuname&"' and ksname='"&team&"'"
end if
on error resume next
set rs=conn.execute(sql)
if err then
[解决办法]
xh=trim(request.querystring("xh"))'获取URL中xh参数的值,并赋值给变量xh
结帖太低。。。
[解决办法]
xh=trim(request.querystring("xh"))//去掉传过来的值的首尾空格stuname=trim(request.querystring("stuname"))//同上team=trim(request.querystring("team"))set rs=conn.execute("select cxsetup from cominfo")//执行数据查询,查询cxsetupcxsetup=rs("cxsetup").value//获取从数据库查询出来的cxsetup字段值rs.close//关闭数据库set rs=nothing //清空数据集if team="all" then //判断传过来的team是不是等于all字符串,如果等于allsql="select * from studentpmb where stuidh='"&xh&"' and stuname='"&stuname&"'"//根据xh、stuname查询数据team="当前时段所有项目"else//若果不等于all,拼接如下sqlsql="select * from studentpmb where stuidh='"&xh&"' and stuname='"&stuname&"' and ksname='"&team&"'"end ifon error resume nextset rs=conn.execute(sql)//执行查询if err then