模糊查询

18320606 2003-12-08 07:37:11
我的命令语句是:
commandText="select * from TongXunLu where " & x2 & "='" & x3 & "'"
set rs = conn.Execute(commandText)

x2为传递过来的select菜单的值,x3为<input type=text>的值.

请问如何实现模糊查询,顺便给我讲解一下有关filter方面的语法,万分感激。。。
...全文
124 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
lvjinyou 2003-12-09
  • 打赏
  • 举报
回复
同意
commandText="select * from TongXunLu where " & x2 & "like'%" & x3 & "%'"
set rs = conn.Execute(commandText)
lious 2003-12-09
  • 打赏
  • 举报
回复
filed like '% keyword %'
zhanghao5188 2003-12-09
  • 打赏
  • 举报
回复
“select * from TongXunLu where 字段 like '%" & x3 & "%' "
511214 2003-12-08
  • 打赏
  • 举报
回复
应该是这个
commandText="select * from TongXunLu where " & x2 & "like'%" & x3 & "%'"
set rs = conn.Execute(commandText)
511214 2003-12-08
  • 打赏
  • 举报
回复
commandText="select * from TongXunLu where '" & x2 & "'='%" & x3 & "%'"
set rs = conn.Execute(commandText)

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧