I am able to get the last inserted id using $this->db->insert_id(); in codeigniter, is there any way that I can get the id of the last updated record? I tried
$this->db->insert_id();
Here is how you can do it shortest
$where = array('vrnoa'=>$data['vrnoa'], 'etype' => 'sale');
//Update the record
$this->db->where($where); $this->db->update('StockMain',$data);
//Get the record
$this->db->where($where); return $this->db->get('StockMain')->row()->stid;