I am using Codeigniter Active Record Class
I am trying to create empty records for a particular id in multiple tables. For example lets say my user has the id $user_id, and I want to create empty records in tables T1, T2 and T3. The code I am having trouble with is:
// Store the select statement in cache
$this->db->start_cache();
$this->db->set('user_id', $user_id);
$this->db->stop_cache();
// Insert empty record in tables related to user
$this->db->insert('T1');
$this->db->insert('T2');
$this->db->insert('T3');
$this->db->flush_cache();
An empty record is inserted in table T1 but then I get the error:
You must use the "set" method to update an entry.
EDIT: - Obviously, tables T1, T2 & T3 have user_id columns.
What am I doing wrong and how can I fix this? I am new to codeigniter and the CI documentation is not clear about this issue.