大学城配套怎么样:asp数据库急~!!~急~!!~急~!!~急~!!~急~!!~
来源:百度文库 编辑:查人人中国名人网 时间:2024/05/13 15:43:19
<%a=split(showrs("gjz"),"|")
b=ubound(a)
c= "'%"&a(0)&"%' " if b>1 then
for i=1 to ubound(a)
c=c&"' or like %"&a(j)&"%' "
next
end if
showsqlxg="select top 10 * from wenzhang where biaoti like "&c&" order by id desc"
set showxgrs= Server.CreateObject("adodb.recordset")
showxgrs.open showsqlxg,conn,1,3
提示SQL语句错误啊
b=ubound(a)
c= "'%"&a(0)&"%' " if b>1 then
for i=1 to ubound(a)
c=c&"' or like %"&a(j)&"%' "
next
end if
showsqlxg="select top 10 * from wenzhang where biaoti like "&c&" order by id desc"
set showxgrs= Server.CreateObject("adodb.recordset")
showxgrs.open showsqlxg,conn,1,3
提示SQL语句错误啊
showsqlxg="select top 10 * from wenzhang where biaoti like "&c&" order by id desc"
改为:
showsqlxg="select top 10 * from wenzhang where biaoti like '%"&c&"%' order by id desc"