अपडेट किया गया CAST
इसे CHAR
. पर
SELECT `posts`.*, CAST(AES_DECRYPT(`posts`.`body`,SHA2(CONCAT('prefix',`users`.`guid`,'suffix'),512)) AS CHAR) as 'realbody'
FROM `posts` JOIN `users`
ON `posts`.`user` = `users`.`id`
ORDER BY `posts`.`id` DESC
नमूना आउटपुट:
| ID | USER | ... | REALBODY | ---...------------------------ | 2 | 2 | ... | Post 2 | | 1 | 1 | ... | Post 1 |
यह रहा SQLFiddle डेमो