Pcook CMS V2.3 Beta 上线测试!
您现在的位置:首页 >> 编程技巧 >> 信息正文

ASP多关键字检索

2008-11-2 19:48:12 来源: 网络 作者:站长 访问:160 次 被顶:7 次 字号:【

sql=" 1=1"
if instr(key," ")<>0 then
str = split(key," ")
for i=0 to ubound(str)
sql = sql&" and title like'%"&str(i)&"%'"
next
strSQL="select * from gb where status='5' and "&sql&" order by pubdate desc"
else
strSQL="select * from gb where status='5' and title like '%"&key&"%' or keyword like '%"&key&"%' order by pubdate desc"
end if

参与评论
网友评论列表
© CopyRight 2008 Pcook.com.cn, Inc.All Rights Reserved.
Powered by:laoy8 Design by:Pcook 沪ICP备08004247号