guys and gals! im trying to retrieve data from a database...i encrypted some fields on INSERT using $key variable and that worked fine but having trouble selecting them with below sql $result = "SELECT aes_decrypt(name,'$key'), aes_DECRYPT(type,'$key'), aes_DECRYPT(number,'$key'), aes_DECRYPT(expiry_date,'$key'), date, trans, userN FROM `tab` WHERE trans= '$transNoForB'"; its retrieving the data that has not been encrypted but not retrieving the encrypted data cheers
guys its half working now by doing putting AS after decrypts but two of the fields are still null......anyone no if there is any common problems with this $result = "SELECT aes_decrypt(name,'$key') as name, aes_DECRYPT(type,'$key') as type, aes_DECRYPT(number,'$key') as number, aes_DECRYPT(expiry_date,'$key') as expiry_date, date, trans, userN FROM `tab` WHERE trans= '$transNoForB'";