Welcome Guest, Not a member yet? Register   Sign In
storing record in tables, that relate to multiple id's
#3

[eluser]Brad K Morse[/eluser]
I tried using that. I have the database autoloading within the libraries array of autoload.php

This is the function I wrote that inserts into two tables.

Code:
function insertTwo() {
  $data = array(
                  'SP_COMMENTS_MESSAGE'       =>  'I am trying to insert this in' ,
                  'SP_COMMENTS_STATUS'        =>  'Completed' ,
                  'SP_COMMENTS_DEPARTMENT_ID' => 1
                );
  $this->db->insert('SP_COMMENTS', $data);
  
  $foreign_key = $this->db->insert_id();
  
  $data2 = array(
                  'SP_TRANSACTIONS_COMMENT_ID'  =>  $foreign_key ,
                  'SP_TRANSACTIONS_STEP_ID'     =>  3
                );
                
  $this->db->insert('SP_TRANSACTIONS', $data2);
  
}

It prints this error out: This feature is not available for the database you are using.

I am using a oracle db, which does not support the $this->db->insert();


Messages In This Thread
storing record in tables, that relate to multiple id's - by El Forum - 11-29-2010, 08:32 AM
storing record in tables, that relate to multiple id's - by El Forum - 11-29-2010, 10:13 AM
storing record in tables, that relate to multiple id's - by El Forum - 11-29-2010, 10:34 AM
storing record in tables, that relate to multiple id's - by El Forum - 11-29-2010, 10:48 AM
storing record in tables, that relate to multiple id's - by El Forum - 11-29-2010, 02:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB