I'm working on a project (using codeigniter) where I use a lot of Active record .
The problem i'm facing is the following :
I receive an array of data and i have to fill few tables by using :
$this->db->insert('db_name', $data);
Now sometime $data contains elements not available inside the table so instead i have to do something like :
unset($data['action']);
unset($data['date']);
Before inserting or I just build another array that contains the exact same element of a specific table .
$arr = array( 'x' => $data['x'])
I already used Kohana before and i know when you insert using the ORM it just ignores elements not available in a specific table .
Is there something like that in Codeigniter ?
PS) Without using any external library