I have two tables user and treeview. From my registration form I wanna pass data to these tables. For example I want to pass username to user table and sponsor ID to treeview table. For single table I use following convention.
public function add_user()
{
$data=array(
'user_name'=>$this->input->post('fullname'),
'sponsor_id'=>$this->input->post('sponsor_id'),
);
$this->db->insert('user',$data);
}
For multiple table what should I do?
how about:
Don’t forget to clean the data before inserting it into the db.