Welcome Guest, Not a member yet? Register   Sign In
Add data to two separate tables
#5

[eluser]clintonbeattie[/eluser]
Perfect. Thanks. This is what I have now. If there is a better way please let me know.

function create_member()
{
$static_salt = $this->config->item('encryption_key');
$new_member_insert_data = array(
'first_name' => $this->input->post('first_name'),
'last_name' => $this->input->post('last_name'),
'email_address' => $this->input->post('email_address'),
'username' => $this->input->post('username'),
'password' => md5($this->input->post('password') . $static_salt)
);
$new_member_insert = array(
'first_name' => $this->input->post('first_name'),
);

$insert = $this->db->insert('membership', $new_member_insert_data);
$insert = $this->db->insert('test', $new_member_insert);
return $insert;
}


Messages In This Thread
Add data to two separate tables - by El Forum - 03-17-2010, 10:34 AM
Add data to two separate tables - by El Forum - 03-17-2010, 10:37 AM
Add data to two separate tables - by El Forum - 03-17-2010, 10:39 AM
Add data to two separate tables - by El Forum - 03-17-2010, 10:44 AM
Add data to two separate tables - by El Forum - 03-17-2010, 10:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB