asp内分类搜索问题,,,帮忙!
代码如下请高手帮忙解决下!search.html代码如下:
<html>
<head>
</head>
<body>
<form method="post" action="search.asp">
<table width="600" height="20" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="226">搜索条件:
<label>
<select name="terms" id="terms">
<option value="name">姓名</option>
<option value="tel">电话号码</option>
<option value="content">详细</option>
</select>
</label></td>
<td width="265">搜索内容:
<label>
<input name="insert" type="text" id="insert" size="20">
</label></td>
<td width="109"><label>
<input type="reset" name="Submit" value="清空">
<input type="submit" name="Submit2" value="搜索">
</label></td>
</tr>
</table>
</form>
</body>
</html>
search.asp代码如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp" -->
<%
choose = request.Form("terms")
search = request.Form("insert")
set rs=server.createobject("adodb.recordset")
exec="select * from tb_info where '"+choose+"' like '"+search+"'"
rs.open exec,conn,1,1
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%
do while not rs.eof
%><tr>
<td><%=rs("name")%></td>
<td><%=rs("tel")%></td>
<td><%=rs("content")%></td>
</tr>
<%
rs.movenext
loop
%>
</table>
数据库字段为id name tel content
运行时总是搜索结果无内容。。。。。。。。。。。。