MySql query:
select md5(md5('pass') + '123'开发者_如何学C) from foo
gives c8ffe9a587b126f152ed3d89a146b445
while phpmd5(md5('pass').'123')
gives
ae2553fb5786e36233d25c879faf3863
What is wrong?select md5(CONCAT(md5('pass'), '123'))
+
is probably adding it.
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
精彩评论