Reputation: 1833
How do I Select
a query from mysql and search WHERE
it from a column that is based64 encoded?
any kind of help is great appreciated:
SELECT * FROM `customer` WHERE base64_decode(name) LIKE '%bobby%'
Upvotes: 0
Views: 263
Reputation:
From MySQL 5.6.1 you can do this with FROM_BASE64().
SELECT * FROM `customer` WHERE FROM_BASE64(name) LIKE '%bobby%'
Earlier versions require a UDF to be installed.
But the question is: why are you encoding data you later want to search on?
Upvotes: 1