public function recordData($data) { $this->load->helper('My-helper'); $oldId = getLatestTableId($this->_table); $this->db->insert($this->_table, $data); if ($oldId != $this->db->insert_id() && !empty($this->db->insert_id())) { return $this->db->insert_id(); } else { return 0; } }
public function createNew($data) { $this->load->helper('my_helper'); $oldId = getLatestTableId($this->_table); $this->db->insert($this->_table, $data); if (!empty($this->db->insert_id()) && $oldId != $this->db->insert_id()) { return $this->db->insert_id(); } else { return false; } }
public function recordData($data) { $this->load->helper('my_helper'); $table = "revenuedata"; $oldId = getLatestTableId($table); $this->db->insert($table, $data); if ($oldId != $this->db->insert_id()) { return $this->db->insert_id(); } else { return 0; } }
public function recordData($portfolioData) { # create new record $this->load->helper('my_helper'); $oldId = getLatestTableId($this->_table); $this->db->insert($this->_table, $portfolioData); if ($oldId != $this->db->insert_id()) { return $this->db->insert_id(); } else { return 0; } }