Unanswered: How can encrypt a string and select it in a readable format?
I would like to encrypt a password in a MySQL DB, simple enough with PASSWORD() or ENCODE(), however I want the site users to be able to request their password to be sent by email if lost so I need to retrieve this password in a readable format, is it possible using perhaps another function?
The password protected area doesn't contain any very sensitive info so it is not a big issue to retrieve it in a readable format.
My first advice would be to store the password in plain text. If there is a simple way to decrypt data, then there isn't much point in encrypting it. If the users can't query the table directly, or even if they can and the password is of little value, then just leave it in plain text (or drop the password requirement altogether).