I have one table in mysql database:
CREATE TABLE IF NOT EXISTS `t` (
`q` varchar(257) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
I added two values to it - one is through mysql-console and other from phpmyadmin:
insert into t(q) values(aes_encrypt('from phpmyadmin', 123456));
insert into t(q) values(aes_encrypt('from mysql console', 123456));
And I tried to display it:
select aes_decrypt(q,123456) from t;
From mysql-console I got the following out put:
mysql> select aes_decrypt(q,123456) from t;
+-----------------------+
| aes_decrypt(q,123456) |
+-----------------------+
| from phpmyadmin |
| from mysql console |
+-----------------------+
2 rows in set (0.00 sec)
From phpadmin I got the following output:
why phpmyadmin don't show correct output?
aes_decrypt
function produces binary data.
Try
select cast(aes_decrypt(q,123456) as char) from t LIMIT 0, 30;
on your phpMyAdmin.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With