我的参数没乱码,sql却成了select ID,COMMAND,DESCRIPTION,CONTENT from message where 1=1 and COMMAND = ? select ID,COMMAND,DESCRIPTION,CONTENT from message where 1=1 and DESCRIPTION like '%' ? '%' 参数就没替换上去,这是为什么?那位大神能帮我解决一下
3 回答
_沉醉不知归路_
TA贡献13条经验 获得超0个赞
select ID,COMMAND,DESCRIPTION,CONTENT from message where 1=1 and DESCRIPTION like ?
然后后面的东西拼接上去可以吧
hua01234567899
TA贡献8条经验 获得超0个赞
select ID,COMMAND,DESCRIPTION,CONTENT from message where 1=1 and COMMAND = ?这句话没错
select ID,COMMAND,DESCRIPTION,CONTENT from message where 1=1 and DESCRIPTION like '% {$description} %'
添加回答
举报
0/150
提交
取消