📄 ywyzl_zlsc_2.asp
字号:
<%response.expires=0%>
<%
'与数据库*.mdb建立连接
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "driver={Microsoft Access Driver (*.mdb)};pwd=webcool_2000;dbq=" & Server.MapPath("../database/customer.mdb")
'建立rs对象
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "SELECT * FROM worker WHERE (name like '%"&request("keyword")&"%' or telephone like '%"&request("keyword")&"%' or sex like '%"&request("keyword")&"%')"
'发送一条SQL的指令
rs.Open sql, conn,3
if rs.eof then
Response.Redirect ("no-data.htm")'转移到相应的网页买卖
else
%>
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY>
<table width=603 border=1 cellpadding=10 height="10">
<tr>
<td bgcolor="#0099FF" align="center" width="108">
<b>
<font size="1" color="#000000"> 姓名</font>
</b>
</td>
<td width=126 valign="top" align="center">
<font size="1"><b>联系电话</b></font>
</td>
<td width=126 valign="top" align="center">
<font size="1"><b>手机</b></font>
</td>
<td width=126 valign="top" align="center">
<font size="1"><b>删 除</b></font>
</td>
</tr>
<%
Do while not rs.eof
' 我们使用数据库中的Name作为关键字
' 通过Name来指定哪条记录将被修改
name = rs("name")
telephone = rs("telephone")
mobile = rs("mobile")
%>
<tr>
<td height="1" width="108" bgcolor="#0099FF" align="center">
<font size="3"><font color="#000000">
<%= name %></font></font></td>
<td height="1" width="126" align="center"><font size="3"><%= telephone %></font></td>
<td height="1" width="126" align="center"><font size="3"><%=mobile%></font></td>
<td height="1" width="126" align="center"><a href="ywyzl_zlsc_1.asp?name=<%=name%>"><font size="3">删除</font></td>
</tr>
<%
rs.MoveNext
loop
set conn=nothing
%>
<%end if%>
</center>
<table>
</BODY>
</HTML>
<html><script language="JavaScript"> </script></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -