日期:2014-05-17 浏览次数:21064 次
xh=trim(request.querystring("xh"))//去掉传过来的值的首尾空格
stuname=trim(request.querystring("stuname"))//同上
team=trim(request.querystring("team"))
set rs=conn.execute("select cxsetup from cominfo")//执行数据查询,查询cxsetup
cxsetup=rs("cxsetup").value//获取从数据库查询出来的cxsetup字段值
rs.close//关闭数据库
set rs=nothing //清空数据集
if team="all" then //判断传过来的team是不是等于all字符串,如果等于all
sql="select * from studentpmb where stuidh='"&xh&"' and stuname='"&stuname&"'"//根据xh、stuname查询数据
team="当前时段所有项目"
else//若果不等于all,拼接如下sql
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