RSS
热门关键字:
当前位置 :| 主页>web development>

ASP handles much keyword to inquire example code

来源: 作者:Stand originally 时间:2008-12-21 Tag: 点击:
Often encounter much keyword to inquire to single field in Web development, I come true commonly through dynamic array. Of course of many keywords is commonly use blank space or, separate, I this a few hypothesis many keywords are separated with blank space, key word string is KeyStr, specific code is.

Program code:

The search of ' key wordStr= "select * From TableName Where Id>4 "If SrhKey<>"" ThenKeyArr=split(srhKey, "" )J=UBound(keyArr)T=0Dim KeystrArr()For I=0 To JIf KeyArr(i)<>"" ThenRedim Preserve KeystrArr(t)Strfilter= "(empZw Like '%" &keyArr(i)&"%' Or EmpDep Like '%" &keyArr(i)&"%' Or EmpGz Like '% "Strfilter=strfilter&keyArr(i)&"%' Or EmpWy1 Like '%" &keyArr(i)&"%' Or EmpWy2 Like '%" &keyArr(i)Strfilter=strfilter&"%' Or EmpYq Like '%" &keyArr(i)&"%' Or Com_name Like '%" &keyArr(i)&"%') "KeystrArr(t)=strfilterT=t 1End IfNextKeystr=join(keystrArr, "And " )Str=str&"And " &keystrEnd If


最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册
栏目列表
热点关注
相关文章