MySql query:
select md5(md5('pass') + '123') from foo
gives c8ffe9a587b126f152ed3d89a146b445
while php md5(md5('pass').'123')
gives ae2553fb5786e36233d25c879faf3863
What is wrong?
select md5(CONCAT(md5('pass'), '123'))
+
可能正在添加它。
That's not how you concatenate strings in MySQL. See for yourself: SELECT 'pass' + '123';
Instead try SELECT md5(concat(md5('pass'), '123')) from foo
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.