Welcome Guest, Not a member yet? Register   Sign In
Inserting into related tables simultaneously
#2

[eluser]Twisted1919[/eluser]
Code:
if(! $this->db->insert('table1',$info))
{
return FALSE;
}
$user_id = $this->db->insert_id():
$info2['user_id'] = $user_id ;
return $this->db->insert('table2',$info2);
Smile


Messages In This Thread
Inserting into related tables simultaneously - by El Forum - 07-26-2010, 03:59 AM
Inserting into related tables simultaneously - by El Forum - 07-26-2010, 04:30 AM
Inserting into related tables simultaneously - by El Forum - 07-26-2010, 05:57 AM
Inserting into related tables simultaneously - by El Forum - 07-26-2010, 06:24 AM
Inserting into related tables simultaneously - by El Forum - 07-26-2010, 07:04 AM
Inserting into related tables simultaneously - by El Forum - 07-26-2010, 02:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB