欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

asp 多關(guān)鍵詞搜索的簡單實現(xiàn)方法

 更新時間:2008年11月26日 12:49:50   作者:  
asp搜索兩個以上的詞的實現(xiàn)方法,簡單的就是利用split,其它的可以參考本站之前更新的文章
假設(shè)在搜索框search中輸入:“asp 編程”
先得到輸入框中的內(nèi)容:search=request("search")
然后將這兩個值分別取出來
s=split(search," ")
'構(gòu)造sql函數(shù)
sql="select * from news"
for i=0 to ubound(s)
m=m&" or title='"&s(i)&"'"
next
'在這里會發(fā)現(xiàn)得到的m前面多了一個or,所以要去掉
m=right(m,len(m)-3)
'將m連接到sql語句上
sql=sql&" "&m
'在使用sql語句
rs.open sql,conn,1,1
'然后顯示查詢出來的結(jié)果

相關(guān)文章

最新評論