$query = "SELECT date, AES_DECRYPT('cardnumber1','jmbjd'), AES_DECRYPT('cardnumber2','jmbjd'), AES_DECRYPT('cardnumber3','jmbjd'), AES_DECRYPT('cardnumber4','jmbjd'), upload_type, z_errors, a_errors, db_errors FROM customers WHERE refrence_number = '$refnum'";
If 'cardnumber1' is the name of the column you need to decrypt, then the quotes are wrong! Either use backticks: `cardnumber1` or no quotes: cardnumber1 Regards, Jigal. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]