求助asp如何指定查询数据库笔画汉字

来源:百度知道 编辑:UC知道 时间:2024/05/22 17:56:07
提交表单如下:
<select class="form" size="1" name="select">
<option value="fantibihua" selected>繁体笔画</option>
</select>

结果页面:
<td width=11% ><a href=javascript:cy('<%=rs("id")%>')><%=rs("fantibihua")%></a></td>

问题是如何能实现显示指定的笔画,,,,目前的程序是如输入2查询,则显示所有2/12/22/32/所有包含2的汉字,怎么能实现如查询2就是只显示2的汉字,不显示12/22/32等笔画汉字,,,注意:其他数字也是如此.
<%
dim totalcs,Currentpage,totalpages,i
fl1=request("fl1")
fl2=request("fl2")
if request("keyword")<>"" and request("select")<>"" then
sql="select * from pic where "&request("select")&" like '%"&request("keyword")&"%'"
elseif request("keyword")<>"" and request("select")="all" then
sql="selec

看下相应的查询语句,使用的是模糊查询吧,用了like的。修改一下,使用=号来查询就可以了
===================
直接改为like还不行的,里面用到通配符“%”,用等号的话,不能用通配符的
1:sql="select * from pic where "&request("select")&" ='"&request("keyword")&"'"
2:sql="select * from pic where sg ='"&request("keyword")&"' or biaoti ='"&request("keyword")&"'"