Problem with MySQL's AES_DECRYPT
问题 I'm looking for a way to encrypt data on its way into a MySQL database, and decrypt it on the way out. Additionally, I would like to be able to perform normal SQL queries on those fields, such as searching and comparison, which prevents me from using a pure PHP solution. This leads me to AES_ENCRYPT() and AES_DECRYPT(), which can be duplicated in PHP using MCRYPT. I'm having a hard time with AES_DECRYPT and have tried all suggestions I can find through searches online. Here's my table: CREATE