关于mysql查询转义后的数据

1、客户端传参数 word = kohl's

2、数据表A 保存时进行转义保存为 kohl\'s 

3、那么sql查询:select * from A where word = "kohl\'s"   查不出数据,需要转义word改写为  select * from A where word = "kohl\\\'s"

猜你喜欢

转载自blog.csdn.net/weixin_38230961/article/details/101033245