[英]search substring of base64 encoded string in mysql using php
我正在嘗試尋找可能的解決方案,以從MySQL的base64編碼字符串中搜索子字符串,我以base64編碼(例如Ricoh SP 212W
Umljb2ggU1AgMjEyVw==
將產品標題存儲為Umljb2ggU1AgMjEyVw==
現在我想搜索所有可能帶有字符串“ SP”的產品,但是我如何Ricoh SP 212W
搜索“ SP”,因為它存儲為base64編碼
這就是我正在嘗試的
Select * from `prducts` where `product_name` LIKE %SP%
但正如我已經提到的, product_name
以Base64編碼存儲
有什么建議嗎
Select * from prducts where FROM_BASE64(product_name) LIKE %SP%
為什么甚至將產品名稱存儲在base64中?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.