Answer by Mitchell McKenna for Code igniter MySQL AES with active records?
September 30 2010, 3:32am
You can still use AES_Encrypt if you turn off escaping for that particular clause by passing FALSE as the last parameter:
$this->db->set('password',"AES_ENCRYPT('{$data['password']}','my_key')",FALSE);
Also point you to the CI built-in Encryption Class, and an article on considering 1-way encryption.