首页  ·  知识 ·  编程语言
ASP多关键字检索
JemBai  http://www.cnblogs.com/JemBai/  ASP  编辑:dezai  图片来源:网络
sql=" 1=1" if instr(key," ")0 then str = split(key," ") for i=0 to ubound(str) sql = sql" and title like'%"str(i)&a
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 本文作者:JemBai 来源:http://www.cnblogs.com/JemBai/
CIO之家 www.ciozj.com 微信公众号:imciow
    >>频道首页  >>网站首页   纠错  >>投诉
版权声明:CIO之家尊重行业规范,每篇文章都注明有明确的作者和来源;CIO之家的原创文章,请转载时务必注明文章作者和来源;
延伸阅读