mysql内置的字符串转换16进制数函数--HEX()
hex(‘secure’)=736563757265
然后这串数字就能代表‘secure’这个字符串,只需要加上0x的前缀!
SELECT * from users WHERE username=0x736563757265 等价于SELECT * from users WHERE username='secure'
hex(‘secure’)=736563757265
然后这串数字就能代表‘secure’这个字符串,只需要加上0x的前缀!
SELECT * from users WHERE username=0x736563757265 等价于SELECT * from users WHERE username='secure'