like 语句为什么不起作用了?
asp吧
全部回复
仅看楼主
level 1
<%
myfunction()
function myfunction()
dim rsp,mysql,myzi
myzi="云"
set rsp= Server.CreateObject("adodb.recordset")
mysql="select * from [分词大表] where 分词 like '%" & myzi & "%'"
'mysql="select * from [分词大表] where instr(分词 ,'" & myzi & "')>0"
rsp.open mysql,conn,1,1
if rsp.RecordCount >-1 then
Response.write "'" & myzi & "'有记录:" & rsp.RecordCount & "条<br>"
else
Response.write "'" & myzi & "'无记录:" & rsp.RecordCount & "条<br>"
end if
rsp.close
set rsp=nothing
end function
%>
<br><br><br>
运行结果:
<br>《分词大表》中含“云”的记录565条,能正常显示
<br>《分词大表》中含“扎”的记录0条,却不能返回“ rsp.RecordCount”的值
<br>用 like 和 instr 均不起作用
2017年02月01日 04点02分 1
1