src/CI_Base_Model.php
public function insert($data)
    {
        if (false !== $data = $this->_do_pre_create($data)) {
            $this->_database->insert($this->_table, $data);
            $insert_id = $this->_database->insert_id();

            $this->trigger('after_create', $insert_id);

            return $insert_id;
        }

        return false;
    }
public function insert($data)
    {
        if (false !== $data = $this->_do_pre_create($data)) {
            $this->_database->insert($this->_table, $data);
            $insert_id = $this->_database->insert_id();

            $this->trigger('after_create', $insert_id);

            return $insert_id;
        }

        return false;
    }
public function insert ( $ data ) { if ( false !== $ data = $ this -> _do_pre_create ( $ data ) ) { $ this -> _database -> insert ( $ this -> _table , $ data ) ; $ insert_id = $ this -> _database -> insert_id ( ) ; $ this -> trigger ( 'after_create' , $ insert_id ) ; return $ insert_id ; } return false ; }
Insert a new row into the table. $data should be an associative array
of data to be inserted. Returns newly created ID.
@param $data
@return bool
Insert a new row into the table . $data should be an associative array of data to be inserted . Returns newly created ID .