xxxxxxxxxx
/*
|=========================================================
| how to get no of affected rows in codeigniter
|=========================================================
*/
$affected_rows = $this->db->affected_rows();
echo $affected_rows;