I have model like this:
function data_input($data, $file_upload) {
$this->db->set('ID_KEY', "LASTID_SEQ.NEXTVAL", FALSE); //false escape
$this->db->insert('FIRST_TABLE', $data);
$this->db->set('ID_KEY', "LASTID_SEQ.NEXTVAL -1", FALSE); //false escape
$this->db->insert('SECOND_TABLE', $file_upload);
return true;
}
And I want to send ID_KEY
's value to controller and using it to update database based on it's ID_KEY
.
My problem is, I can generate value of ID_KEY
which is same in FIRST_TABLE and SECOND_TABLE, but I cant send the value to the controller.
or, Can I use another method to get the value of "insert_id()"
of insert in oracle active record. (or using $this->db->query
?)