[eluser]jamie young[/eluser]
I am new to CI, and was happy to see w/ just a few changes to my existing code I had it working in CI. I want to switch my DB inserts from standard queries over to CI's active record inserts but I have not found a way to deal with AES_ENCRYPT calls.
I had a query like this:
Code:
$query = "INSERT INTO user
SET email = '{$data['email']}',
password = AES_ENCRYPT('{$data['password']}', 'xxx'),
user_type = '{$data['type']}',
user_fname = '{$data['first_name']}',
user_lname = '{$data['last_name']}'
";
Which I have converted to this:
Code:
$this->db->set('email', $data['email']);
$this->db->set('user_type', $data['type']);
$this->db->set('user_fname', $data['first_name']);
$this->db->set('user_lname', $data['last_name']);
$this->db->insert('user');
I am not sure how to get the password line in there though.