
asp模糊搜索怎么做啊 下面是我的代码,怎么把带有关键字的全部显示出来
<!--#includefile="coon.asp"--><%vip=request.form("vip")dimsqlsql="select*fromhykwhere...
<!--#include file="coon.asp"-->
<%
vip=request.form("vip")
dim sql
sql="select * from hyk where vip like '%"&vip&"%'"
set rs=conn.execute(sql)
if rs.eof or rs.bof then
response.write(tel)
response.write"<br />没有查询到你要的数据!!"
else
%>
<html>
<head>
<title>查询测试页</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
-->
</style></head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" align="center" cellspacing="1" bgcolor="#000000">
<tbody>
<tr bgcolor="#ffffff">
<td class="zi" width="158"><p align="center"><strong>VIP卡号</strong></p></td>
<td width="99" height="24"><div align="center"><strong>类型</strong></div></td>
<td width="102" height="24"><div align="center"><strong>客户名称</strong></div></td>
<td width="98" height="24"><div align="center"><strong>有效日期</strong></div></td>
<td width="79"><div align="center"><strong>积分余额</strong></div></td>
</tr>
<tr bgcolor="#ffffff">
<td><%=rs("vip")%></td>
<td><%=rs("leixing")%></td>
<td><%=rs("客户名称")%></td>
<td><%=rs("有效日期")%></td>
<td><%=rs("积分余额")%></td>
</tr>
</tbody>
</table>
<%
end if
rs.close
set rs=nothing
%>
</table>
</body>
</html> 展开
<%
vip=request.form("vip")
dim sql
sql="select * from hyk where vip like '%"&vip&"%'"
set rs=conn.execute(sql)
if rs.eof or rs.bof then
response.write(tel)
response.write"<br />没有查询到你要的数据!!"
else
%>
<html>
<head>
<title>查询测试页</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
-->
</style></head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" align="center" cellspacing="1" bgcolor="#000000">
<tbody>
<tr bgcolor="#ffffff">
<td class="zi" width="158"><p align="center"><strong>VIP卡号</strong></p></td>
<td width="99" height="24"><div align="center"><strong>类型</strong></div></td>
<td width="102" height="24"><div align="center"><strong>客户名称</strong></div></td>
<td width="98" height="24"><div align="center"><strong>有效日期</strong></div></td>
<td width="79"><div align="center"><strong>积分余额</strong></div></td>
</tr>
<tr bgcolor="#ffffff">
<td><%=rs("vip")%></td>
<td><%=rs("leixing")%></td>
<td><%=rs("客户名称")%></td>
<td><%=rs("有效日期")%></td>
<td><%=rs("积分余额")%></td>
</tr>
</tbody>
</table>
<%
end if
rs.close
set rs=nothing
%>
</table>
</body>
</html> 展开
1个回答
展开全部
<%while not rs.eof%>
<td><%=rs("vip")%></td>
<td><%=rs("leixing")%></td>
<td><%=rs("客户名称")%></td>
<td><%=rs("有效日期")%></td>
<td><%=rs("积分余额")%></td>
<%rs.movenext
wend%>
<td><%=rs("vip")%></td>
<td><%=rs("leixing")%></td>
<td><%=rs("客户名称")%></td>
<td><%=rs("有效日期")%></td>
<td><%=rs("积分余额")%></td>
<%rs.movenext
wend%>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询