fenlei1 = trim(request("fenlei1"))
fenlei2 = trim(request("fenlei2"))
teacher = trim(request("teacher"))
id = trim(request("id"))
if fenlei1 = "" then
strquery1 = "1=1"
else
strquery1 = "fenlei1 like '%"&fenlei1&"%'"
end if
if fenlei2 = "" then
strquery2 = "1=1"
else
strquery2 = "fenlei2 like '%"&fenlei2&"%'"
end if
if teacher = "" then
strquery3 = "1=1"
else
strquery3 = "teacher like '%"&teacher&"%'"
end if
if id = "" then
strquery4 = "1=1"
else
strquery4 = "teacherid="&id
end if
sql = "select * from teacher where "&strquery1&" and "&strquery2&" and "&strquery3&" and "&strquery4
set rs = server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.bof and rs.eof then
rs.close
set rs = nothing
conn.close
set conn = nothing
response.write "alert('没有找到符合条件的教师');history.go(-1);"
response.end
else
%>
教师管理
搜索到的教师列表 添加
ID
教师姓名
教师所属
教师所属
编辑
资料列表
删除
do while not rs.eof
response.write ""
response.write ""&rs("teacherid")&""
response.write ""&rs("teacher")&""
response.write ""&rs("fenlei1")&""
response.write ""&rs("fenlei2")&""
response.write "编辑"
response.write "资料列表"
response.write "删除"
response.write ""
rs.movenext
loop
%>
rs.close
set rs = nothing
conn.close
set conn = nothing
end if
%>