| <%
ssubject= Request("sub")
office = Request("office")
if ssubject="全部" then
ssubject="%"
end if
ssubject=trim(ssubject)
office=trim(office)
SQL="select * from telnum where dep like '"&ssubject&"' and office like'%"&office&"%'"
set Conn=Server.Createobject("ADODB.Connection")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("telnumdb1.mdb")
set RS=Server.CreateObject("ADODB.Recordset")
set RS=Conn.Execute(SQL)
%>
<% if RS.Eof Then
Response.Write ""
Response.Write " 对不起!没有您所查找的单位: "%>
<%=office%>
<%Response.Write " "%>
<%Response.Write " | "%>
<%else%>
<%i=1%>
|
查找结果
|
| 序号 |
部门 |
单位 |
办公室 |
电话号码
<%do while not RS.Eof%>
|
| <%=i%> |
<%=RS("dep")%> |
<%=RS("office")%> |
<%=RS("person")%> |
<%=RS("telnum")%> |
<%RS.Movenext
i=i+1
Loop
end if
RS.Close
Conn.Close
%>
|
|
校址:武汉市珞喻路152号 邮编:430079 版权所有: 华中师范大学 鄂ICP备0503325
|