關於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"

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章